tpm icon indicating copy to clipboard operation
tpm copied to clipboard

Cannot set variables with a name whose prefix is `plugin`

Open ShelpAm opened this issue 1 year ago • 2 comments

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.

ShelpAm avatar Apr 08 '24 05:04 ShelpAm

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.

RossBarnie avatar Jun 17 '24 22:06 RossBarnie

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/'

ShelpAm avatar Aug 21 '24 17:08 ShelpAm