tpm icon indicating copy to clipboard operation
tpm copied to clipboard

Automatic installation issue and workaround

Open leonsenft opened this issue 7 years ago • 4 comments

The instructions for automatic plugin installation only install tpm but not any other plugins.

The issue is that the tpm/bin/install_plugins script depends on the TMUX_PLUGIN_MANAGER_PATH being set, but that isn't done until tpm/tpm is run. But tpm/tpm has to be run after plugins are installed to correctly source them. Calling it both before and after the plugin install script seems unnecessary.

Perhaps the install script could be modified to setup the path env variable if missing?

For now a workaround is to set TMUX_PLUGIN_MANAGER_PATH manually before the automatic installation code.

setenv -g TMUX_PLUGIN_MANAGER_PATH '$HOME/.tmux/plugins/'

if "test ! -d ~/.tmux/plugins/tpm" \
  "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && \
      ~/.tmux/plugins/tpm/bin/install_plugins'"

run '~/.tmux/plugins/tpm/tpm'

leonsenft avatar Feb 01 '17 06:02 leonsenft

Thanks, had the same problem. See #99 as well.

timss avatar Sep 03 '17 13:09 timss

@leonsenft I believe it should be:

setenv -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins/"

The "-quotes will expand $HOME. I was getting a literal directory called $HOME in my home directory.

HaleTom avatar Sep 12 '18 08:09 HaleTom

Why is this not in the repo already :(

MarioRicalde avatar Mar 08 '19 14:03 MarioRicalde

it works for me

setenv -g TMUX_PLUGIN_MANAGER_PATH "$HOME/.tmux/plugins/"

if "test ! -d ~/.tmux/plugins/tpm" \
  "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && \
      ~/.tmux/plugins/tpm/bin/install_plugins'"

run -b '~/.tmux/plugins/tpm/tpm'

xendarboh avatar Nov 05 '19 17:11 xendarboh