1
0
Fork 0
mirror of synced 2024-12-21 22:31:06 -05:00

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
This commit is contained in:
Gregory Pakosz 2019-11-30 19:50:58 +01:00
parent 92ed649597
commit 1cf813fa8b

View file

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