tmux-plugins / tpm

Tmux Plugin Manager
MIT License
12.32k stars 433 forks source link

Fix: cannot set variables with a name whose prefix is `plugin` #281

Open ShelpAm opened 7 months ago

ShelpAm commented 7 months ago

This breaks something I don't know. :(

Part of my configuration file:

set -g @plugins_dir '~/.local/share/tmux/plugins'

set-environment -g TMUX_PLUGIN_MANAGER_PATH "#{@plugins_dir}"

set -g @plugin 'tmux-plugins/tpm'

run "#{@plugins_dir}/tpm/tpm"

which produces Installing "plugin" "plugin" download fail.

RossBarnie commented 5 months ago

Can you try calling the plugins_dir something else? I suspect there's a bit of a regex problem here in that TPM will look not only at what's in the plugin variable but also just regex-match set -g @plugin entries, which your plugins_dir will conflict with.

ShelpAm commented 3 months ago

Can you try calling the plugins_dir something else? I suspect there's a bit of a regex problem here in that TPM will look not only at what's in the plugin variable but also just regex-match set -g @plugin entries, which your plugins_dir will conflict with.

It seems you are right. Variables with prefix 'plugin' break something.

After changing the name without the prefix 'plugin', it worked. Like this:

set -g @other_prefix_plugins_dir '/tmp/'