mirror of
https://github.com/tmux-plugins/tpm.git
synced 2024-10-31 23:28:47 +00:00
Add new option for user defined tmux.conf.local
This commit is contained in:
parent
26d9ace1b4
commit
9ee9e74b1b
@ -20,11 +20,20 @@ _CACHED_TPM_PATH="$(_tpm_path)"
|
|||||||
#
|
#
|
||||||
_get_user_tmux_conf() {
|
_get_user_tmux_conf() {
|
||||||
# Define the different possible locations.
|
# 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"
|
xdg_location="$XDG_CONFIG_HOME/tmux/tmux.conf"
|
||||||
default_location="$HOME/.tmux.conf"
|
default_location="$HOME/.tmux.conf"
|
||||||
|
|
||||||
# Search for the correct configuration file by priority.
|
# 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"
|
echo "$xdg_location"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user