1
0
Fork 0
mirror of synced 2024-11-17 23:15:35 -05:00

added support for arguments to custom variables defined in ~/.tmux.conf.local (2), fixes #547

This commit is contained in:
Gregory Pakosz 2022-01-14 07:45:06 +01:00
parent b3915221f8
commit 9a2387c0c7

View file

@ -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