{"action":"opened","issue":{"url":"https://api.github.com/repos/tmux-plugins/tpm/issues/59","labels_url":"https://api.github.com/repos/tmux-plugins/tpm/issues/59/labels{/name}","comments_url":"https://api.github.com/repos/tmux-plugins/tpm/issues/59/comments","events_url":"https://api.github.com/repos/tmux-plugins/tpm/issues/59/events","html_url":"https://github.com/tmux-plugins/tpm/issues/59","id":114722226,"number":59,"title":"TPM does not work if sourced via 'if-shell' in a parent .tmux.conf","user":{"login":"mclamb","id":117364,"avatar_url":"https://avatars.githubusercontent.com/u/117364?v=3","gravatar_id":"","url":"https://api.github.com/users/mclamb","html_url":"https://github.com/mclamb","followers_url":"https://api.github.com/users/mclamb/followers","following_url":"https://api.github.com/users/mclamb/following{/other_user}","gists_url":"https://api.github.com/users/mclamb/gists{/gist_id}","starred_url":"https://api.github.com/users/mclamb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mclamb/subscriptions","organizations_url":"https://api.github.com/users/mclamb/orgs","repos_url":"https://api.github.com/users/mclamb/repos","events_url":"https://api.github.com/users/mclamb/events{/privacy}","received_events_url":"https://api.github.com/users/mclamb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-03T01:18:53Z","updated_at":"2015-11-03T01:18:53Z","closed_at":null,"body":"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:\r\n\r\nThis does *NOT* work:\r\n\r\n~/.tmux.conf:\r\nif-shell '[ -f ~/.tmux.conf.user ]' 'source ~/.tmux.conf.user'\r\n\r\nThis *DOES* work:\r\n\r\n~/.tmux.conf:\r\nsource ~/.tmux.conf.user\r\n\r\nMy ~/.tmux.conf.user is simply:\r\n\r\nset -g @plugin 'tmux-plugins/tpm'\r\nset -g @plugin 'tmux-plugins/tmux-sensible'\r\nset -g @plugin 'nhdaly/tmux-scroll-copy-mode'\r\nrun '~/.tmux/plugins/tpm/tpm'"}}