From 9a2387c0c7aa8d12cff06d6be17251e8ebdfd034 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Fri, 14 Jan 2022 07:45:06 +0100 Subject: [PATCH] added support for arguments to custom variables defined in ~/.tmux.conf.local (2), fixes #547 --- .tmux.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.tmux.conf b/.tmux.conf index 15d70bf..3b65e46 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -1321,7 +1321,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # # -- 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\\1)%g; !p' < ~/.tmux.conf.local) +# replacements=$(perl -n -e 'print if s!^#\s+([^_][^()\s]+)\s*\(\)\s*{\s*\n!s%#\\\{\1((?:\\s+(?:[^\{\}]+?|#\\{(?:[^\{\}]+?)\}))*)\\\}%#(cut -c3- ~/.tmux.conf.local | sh -s \1\\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