Open tigerinus opened 2 years ago
What would you prefer? ~/.local/share
? Tons of shell apps dump stuff like plugins into /.config
. Fish for example.
Yes, ~/.local/share
($XDG_DATA_SHARE
) would be the correct place to put it. As @tigerinus said, ~/.config
($XDG_CONFIG_HOME
) is supposed to be for configuration files only.
When tools respect this distinction, it makes it much easier to sync configurations across systems, among other benefits.
Fortunately, it's easy to tell TPM to install them to the right place. Just add this to your tmux.conf
:
set-environment -g TMUX_PLUGIN_MANAGER_PATH "~/.local/share/tmux/plugins/"
About this:
set-environment -g TMUX_PLUGIN_MANAGER_PATH "~/.local/share/tmux/plugins/"
Could I use set-environment -g TMUX_PLUGIN_MANAGER_PATH "$XDG_DATA_HOME/tmux/plugins/"
, or tmux does not perform expansion?
Try add -F
flag to expand format, for example:
Usage:
man tmux
set-environment [-Fhgru] [-t target-session] name [value]
..., If
-F
is present, then value is expanded as a format. ...
- set-environment -g TMUX_PLUGIN_MANAGER_PATH "$XDG_DATA_HOME/tmux/plugins/"
+ set-environment -g -F TMUX_PLUGIN_MANAGER_PATH "${XDG_DATA_HOME}/tmux/plugins"
~/.config is generally for configuration only, where plugin directory contains more than just configuration.
Plus .config can be version controlled, but plugin subdirectory might already have .git/ already.