This commit is contained in:
Spencer Butler 2019-10-24 21:26:29 -04:00 committed by GitHub
commit 6392a25d51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,11 +20,20 @@ _CACHED_TPM_PATH="$(_tpm_path)"
#
_get_user_tmux_conf() {
# Define the different possible locations.
#
# Allow user defined config file location
# Add the following to your config file
# set -g @tpm_conf_default_location '/path/to/tmux.conf.local'
user_location="$(tmux show-options -gqv @tpm_conf_default_location)"
xdg_location="$XDG_CONFIG_HOME/tmux/tmux.conf"
default_location="$HOME/.tmux.conf"
# Search for the correct configuration file by priority.
if [ -f "$xdg_location" ]; then
if [ -f "$user_location" ]; then
echo "$user_location"
elif [ -f "$xdg_location" ]; then
echo "$xdg_location"
else