made _apply_bindings() more robust
This commit is contained in:
parent
67c22c2700
commit
ffc2dfbe78
1 changed files with 6 additions and 6 deletions
12
.tmux.conf
12
.tmux.conf
|
@ -677,9 +677,9 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# [ -z "$line" ] && continue
|
||||
# left=$(printf '%s' "$line" | cut -c-"$column" | sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g')
|
||||
# if _is_enabled "$tmux_conf_new_pane_retain_current_path"; then
|
||||
# right=$(printf '%s' "$line" | cut -c"$column-" | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/split-window([ \t]+-(h|v))?$/& -c "#{pane_current_path}"/g')
|
||||
# right=$(printf '%s' "$line" | cut -c"$column-" | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e '/#\{pane_current_path\}/!s/split(-|_)window([ \t]+#\{pane_tty\})?([ \t]+-(h|v))?/& -c "#{pane_current_path}"/g')
|
||||
# else
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/-c[ \t]+"#\{pane_current_path\}"$//g')
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/[ \t]+(-c[ \t]+(\\")?"#\{pane_current_path\}"(\\")?|-c #\{pane_current_path\})//g')
|
||||
# fi
|
||||
# eval "tmux $left $right" 2>/dev/null || true
|
||||
# done << EOF
|
||||
|
@ -691,9 +691,9 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# [ -z "$line" ] && continue
|
||||
# left=$(printf '%s' "$line" | cut -c-"$column" | sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g')
|
||||
# if _is_enabled "$tmux_conf_new_pane_reconnect_ssh"; then
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/"/\\"/g' -e 's/split-window([^;]+)/run-shell "cut -c3- ~\/\.tmux\.conf | sh -s _split_window #{pane_tty}\1"/g')
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e '/_split_window/!s/"/\\"/g' -e 's/split-window([^;]*)/run-shell "cut -c3- ~\/\.tmux\.conf | sh -s _split_window #{pane_tty}\1"/g')
|
||||
# else
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/\\"/"/g' -e 's/run-shell "cut -c3- ~\/\.tmux\.conf \| sh -s _split_window #\{pane_tty\}([^;]+)"/split-window\1/g' -e 's/#\{.+\}/\"&\"/g')
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e 's/\\"/"/g' -e 's/run-shell "cut -c3- ~\/\.tmux\.conf \| sh -s _split_window #\{pane_tty\}([^;]*)"/split-window\1/g' -e 's/#\{.+\}/\"&\"/g')
|
||||
# fi
|
||||
# eval "tmux $left $right" 2>/dev/null || true
|
||||
# done << EOF
|
||||
|
@ -726,9 +726,9 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# # shellcheck disable=SC2086
|
||||
# for table in "" "-t emacs-copy" "-t vi-copy"; do
|
||||
# line=$(tmux list-keys $table 2>/dev/null | grep -e 'copy-selection\|copy-pipe' | head -1)
|
||||
# [ -z "$line" ] && continue
|
||||
# prefix=${line%copy-*}
|
||||
# column=${#prefix}
|
||||
# [ -z "$line" ] && continue
|
||||
#
|
||||
# while IFS= read -r line; do
|
||||
# [ -z "$line" ] && continue
|
||||
|
@ -736,7 +736,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
|
|||
# if _is_enabled "$tmux_conf_copy_to_os_clipboard"; then
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e "s/copy-selection(-and-cancel)?$/copy-pipe\1 \"$command\"/g")
|
||||
# else
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e "s/copy-pipe(-and-cancel)? \"$command\"$/copy-selection\1/g")
|
||||
# right=$(printf '%s' "$line" | cut -c"$column"- | awk -F'\"' 'BEGIN { OFS = FS } { for (i = 1; i <= NF; i+=2) { gsub(/#{.+}/, "\"&\"", $i) } print }' | sed -E -e "s/copy-pipe(-and-cancel)? \"?$command\"?$/copy-selection\1/g")
|
||||
# fi
|
||||
# eval "tmux $left $right" 2>/dev/null || true
|
||||
# done << EOF
|
||||
|
|
Loading…
Reference in a new issue