From 760bf4fabda9a41f67f8ad7e202c2a66a2a3d4e1 Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sat, 24 Apr 2021 19:26:16 +0200 Subject: [PATCH] made _apply_bindings() work with tmux 3.2 stock bindings, fixes #472 --- .tmux.conf | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 7f2f988..6f66866 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -785,9 +785,13 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # # if [ -n "$command" ]; then # if _is_enabled "$tmux_conf_copy_to_os_clipboard"; then -# perl -p -i -e "s/\bcopy-selection(-and-cancel)?\b/copy-pipe\1 '$command'/g" "$cfg" +# perl -p -i -e "s/(?!.*?$command)\bcopy-(?:selection|pipe)(-and-cancel)?\b/copy-pipe\1 '$command'/g" "$cfg" # else -# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2/copy-selection\1/g" "$cfg" +# if [ $_tmux_version -ge 320 ]; then +# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2?/copy-pipe\1/g" "$cfg" +# else +# perl -p -i -e "s/\bcopy-pipe(-and-cancel)?\b\s+(\"|')?$command\2?/copy-selection\1/g" "$cfg" +# fi # fi # fi # @@ -998,7 +1002,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-none} # tmux_conf_theme_prefix_attr=${tmux_conf_theme_prefix_attr:-none} # -# tmux_conf_theme_mouse=${tmux_conf_theme_mouse:-↗} # U+2197 +# tmux_conf_theme_mouse=${tmux_conf_theme_mouse:-↗} # U+2197 # tmux_conf_theme_mouse_fg=${tmux_conf_theme_mouse_fg:-none} # tmux_conf_theme_mouse_bg=${tmux_conf_theme_mouse_bg:-none} # tmux_conf_theme_mouse_attr=${tmux_conf_theme_mouse_attr:-none}