From 1cf813fa8bfdd5ae96f82bda8231692c85c5beda Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sat, 30 Nov 2019 19:50:58 +0100 Subject: [PATCH] rewrote _apply_bindings() to support new tmux 3.0 bindings (3) reading and writing to the modified list-keys' output gave the illusion it worked --- .tmux.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 883038e..4333ddf 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -744,12 +744,12 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim # # # until tmux >= 3.0, output of tmux list-keys can't be consumed back by tmux source-file without applying some escapings # awk < "$cfg" \ -# '{i = $2 == "-T" ? 4 : 5; gsub(/^[;]$/, "\\\\&", $i); gsub(/^[$"#~]$/, "'"'"'&'"'"'", $i); gsub(/^['"'"']$/, "\"&\"", $i); print}' > "$cfg" +# '{i = $2 == "-T" ? 4 : 5; gsub(/^[;]$/, "\\\\&", $i); gsub(/^[$"#~]$/, "'"'"'&'"'"'", $i); gsub(/^['"'"']$/, "\"&\"", $i); print}' > "$cfg.in" # # # ignore bindings with errors # while ! out=$(tmux source-file "$cfg"); do # line=$(printf "%s" "$out" | cut -d':' -f2) -# perl -n -i -e "if ($. != $line) { print }" "$cfg" +# perl -n -i -e "if ($. != $line) { print }" "$cfg.in" # done # } #