tmux-plugins / tpm

Tmux Plugin Manager
MIT License
12.21k stars 429 forks source link

TPM does not work if sourced via 'if-shell' in a parent .tmux.conf #59

Closed mclamb closed 9 years ago

mclamb commented 9 years ago

Maybe this is a tmux issue more than a tpm issue? I am not sure, if I have all of my tpm setup in a file called ~/.tmux.conf.user, which gets sources from the main ~/.tmux.conf, then using 'if-shell' does not work, whereas sourcing directly does. TPM itself does get sourced and the keybindings work. It just does not think any plugins are installed. In other words:

This does NOT work:

~/.tmux.conf: if-shell '[ -f ~/.tmux.conf.user ]' 'source ~/.tmux.conf.user'

This DOES work:

~/.tmux.conf: source ~/.tmux.conf.user

My ~/.tmux.conf.user is simply:

set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'nhdaly/tmux-scroll-copy-mode' run '~/.tmux/plugins/tpm/tpm'

mclamb commented 9 years ago

Ahh see this is a known issue, sorry.

kand commented 8 years ago

Where are you seeing this as a know issue? I'm having the same problem.

stefanfrede commented 7 years ago

This is still an issue. Is there a way to make it work besides sourcing directly?