From 63d3bfe1ecc7f4520851207698c87a268df74b3d Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sun, 1 Dec 2019 13:43:58 +0100 Subject: [PATCH] rewrote _apply_bindings() to support new tmux 3.0 bindings (4) failed to source the proper modified file, fixes #303 --- .tmux.conf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 4333ddf..02acbe9 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -666,7 +666,8 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim # } # # _apply_bindings() { -# cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT +# #cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT +# cfg=/tmp/tmux.conf # # tmux list-keys | grep -vF 'tmux.conf.local' | grep -E '(new-window|split(-|_)window|new-session|copy-selection|copy-pipe)' > "$cfg" # @@ -747,7 +748,7 @@ run -b '[ -z "#{window_active}" ] && [ -z "#{version}" ] && tmux set display-tim # '{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 +# while ! out=$(tmux source-file "$cfg.in"); do # line=$(printf "%s" "$out" | cut -d':' -f2) # perl -n -i -e "if ($. != $line) { print }" "$cfg.in" # done