From 1c06f3742e7e69cfeabcdbee361b66ceee021e7f Mon Sep 17 00:00:00 2001 From: zhengxd Date: Wed, 21 Jun 2017 16:27:57 +0800 Subject: [PATCH] add extend tmux conf path configuration "TMUX_EXTEND_PATH" --- scripts/helpers/plugin_functions.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/helpers/plugin_functions.sh b/scripts/helpers/plugin_functions.sh index d2778d5..aea4d78 100644 --- a/scripts/helpers/plugin_functions.sh +++ b/scripts/helpers/plugin_functions.sh @@ -13,10 +13,16 @@ _tpm_path() { _manual_expansion "$string_path" } +_tmux_extend_path() { + local conf_path="$(tmux start-server\; show-environment -g TMUX_EXTEND_PATH | cut -f2 -d=)" + _manual_expansion "$conf_path" +} + _CACHED_TPM_PATH="$(_tpm_path)" +_CACHED_TMUX_EXTEND_PATH="$(_tmux_extend_path)" _tmux_conf_contents() { - cat /etc/tmux.conf ~/.tmux.conf 2>/dev/null + cat /etc/tmux.conf ~/.tmux.conf $_CACHED_TMUX_EXTEND_PATH 2>/dev/null if [ "$1" == "full" ]; then # also output content from sourced files local file for file in $(_sourced_files); do