mirror of
1
0
Fork 0

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

This commit is contained in:
Gregory Pakosz 2020-10-08 08:56:27 +02:00
parent 8ffeb1d809
commit e03d73df73
1 changed files with 3 additions and 3 deletions

View File

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