tmux-wormhole
tmux-wormhole copied to clipboard
Plugin cannot find tmux-wormhole binary if installation directory is different than expected
Bug
If the plugin was installed anywhere other than in ~/.tmux/plugins/tmux-wormhole/
, the bash script can't find the executable (source).
Context
The plugin assumes that it will be installed in ~/.tmux/plugins/
. But since version 3.1, tmux config files can alternatively be stored in ~/.config/tmux/
, and since 3.2, in $XDG_CONFIG_HOME/tmux/
. Also, TPM can override the location of plugins.
Proposed solution
Look for the executable in all the possible locations:
-
${TMUX_PLUGIN_MANAGER_PATH}/tmux-wormhole/tmux-wormhole
-
${XDG_CONFIG_HOME}/tmux/plugins/tmux-wormhole/tmux-wormhole
-
~/.config/tmux/plugins/tmux-wormhole/tmux-wormhole
-
~/.tmux/plugins/tmux-wormhole/tmux-wormhole