From 6815beef4f302d5a04d43fb4c966c660a7cc041f Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sat, 30 Nov 2019 15:48:40 +0100 Subject: [PATCH] afer the _apply_bindings() rewrite, perl has become mandatory --- .tmux.conf | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index ab46da8..03d1777 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -206,23 +206,9 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim # fi # } # -# if command -v perl > /dev/null 2>&1; then -# _decode_unicode_escapes() { -# printf '%s' "$*" | perl -CS -pe 's/(\\u([0-9A-Fa-f]{1,4})|\\U([0-9A-Fa-f]{1,8}))/chr(hex($2.$3))/eg' 2>/dev/null -# } -# elif bash --norc --noprofile -c '[[ ! $BASH_VERSION < 4.2. ]]' > /dev/null 2>&1; then -# _decode_unicode_escapes() { -# bash --norc --noprofile -c "printf '%b' '$*'" -# } -# elif command -v python > /dev/null 2>&1; then -# _decode_unicode_escapes() { -# python -c "import re; import sys; sys.stdout.write(re.sub(r'\\\U([0-9A-Fa-f]{1,8})', lambda match: r'\U%s' % match.group(1).zfill(8), r'$*').encode().decode('unicode-escape', 'ignore'))" -# } -# else -# _decode_unicode_escapes() { -# printf '%b' "$*" -# } -# fi +# _decode_unicode_escapes() { +# printf '%s' "$*" | perl -CS -pe 's/(\\u([0-9A-Fa-f]{1,4})|\\U([0-9A-Fa-f]{1,8}))/chr(hex($2.$3))/eg' 2>/dev/null +# } # # _maximize_pane() { # current_session=${1:-$(tmux display -p '#{session_name}')}