mirror of
https://github.com/tmux-plugins/tmux-sensible.git
synced 2024-11-24 00:48:46 +00:00
Evaluate XDG_CONFIG_HOME according to XDG Base Directory Specification
This commit is contained in:
parent
25cb91f42d
commit
aaa66d4e15
@ -68,10 +68,16 @@ get_tmux_config() {
|
|||||||
local tmux_config_xdg="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf"
|
local tmux_config_xdg="${XDG_CONFIG_HOME:-$HOME/.config}/tmux/tmux.conf"
|
||||||
local tmux_config="$HOME/.tmux.conf"
|
local tmux_config="$HOME/.tmux.conf"
|
||||||
|
|
||||||
if [ -f "${tmux_config_xdg}" ]; then
|
if [ -n "${XDG_CONFIG_HOME}" ]; then
|
||||||
echo "${tmux_config_xdg}"
|
if [ -f "${tmux_config_xdg}" ]; then
|
||||||
|
echo "${tmux_config_xdg}"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo ${tmux_config}
|
if [ -f "${tmux_config}" ]; then
|
||||||
|
echo "${tmux_config}"
|
||||||
|
else
|
||||||
|
echo "$HOME/.config/tmux/tmux.conf"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user