From e03d73df736d6e22ad479f2b9a50c9755a9a887d Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Thu, 8 Oct 2020 08:56:27 +0200 Subject: [PATCH] added support for custom variables defined in ~/.tmux.conf.local (2), fixes #417 --- .tmux.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index f1dc089..79ed9e6 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1211,9 +1211,9 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim # # -- custom variables --------------------------------------------------- # # if [ -f ~/.tmux.conf.local ] && [ x"$(cut -c3- ~/.tmux.conf.local | sh 2>/dev/null -s printf probe)" = x"probe" ]; then -# replacements=$(perl -n -e 'print if s!^#\s+([^()\s]+)\s*\(\)\s*{\s*\n!s%#{\1}%#(cut -c3- ~/.tmux.conf.local | sh -s \1)%g; !p' < ~/.tmux.conf.local) -# status_left=$(echo "$status_left" | perl -p -e "$replacements") -# status_right=$(echo "$status_right" | perl -p -e "$replacements") +# replacements=$(perl -n -e 'print if s!^#\s+([^()\s]+)\s*\(\)\s*{\s*\n!s%#\\\{\1\\\}%#(cut -c3- ~/.tmux.conf.local | sh -s \1)%g; !p' < ~/.tmux.conf.local) +# status_left=$(echo "$status_left" | perl -p -e "$replacements" || echo "$status_left") +# status_right=$(echo "$status_right" | perl -p -e "$replacements" || echo "$status_right") # fi # # # -----------------------------------------------------------------------