.tmux: problems installing on latest tmux (git 3.1)

I decided to upgrade from the tmux pachage in the repos to the git version to get a bugfix from the newer update, but now .tmux doesn’t work anymore. When I source .tmux.conf i get

'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' returned 2 

and the statusline is the normal tmux one. If i revert to the older tmux version (2.9a2), .tmux works again.

The output of

cut -c3- ~/.tmux.conf | sh -sx _apply_configuration > tmux.log 2>&1
is here
+ cat
+ set -e
+ printf ''
+ sed -E s///
+ __newline='
'
+ command -v perl
+ _apply_configuration
+ command -v reattach-to-user-namespace
+ _apply_overrides
+ tmux_conf_theme_24b_colour=true
+ _is_enabled true
+ '[' xtrue = xenabled ']'
+ '[' xtrue = xtrue ']'
+ return 0
+ case "$TERM" in
+ _apply_bindings
++ tmux list-keys
++ grep new-window
++ head -1
+ line='bind-key    -T prefix       c                     new-window'
+ prefix='bind-key    -T prefix       c                     '
+ column=50
+ tmux_conf_new_window_retain_current_path=false
++ tmux list-keys
++ grep -e 'new-window\(\s\+-c\s\+"#{pane_current_path}\|$\)'
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T prefix       c                     new-window' ']'
++ printf %s 'bind-key    -T prefix       c                     new-window'
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
++ cut -c-50
+ left='bind-key    -T prefix       c                     '
+ _is_enabled false
+ '[' xfalse = xenabled ']'
+ '[' xfalse = xtrue ']'
+ '[' xfalse = xyes ']'
+ '[' xfalse = x1 ']'
+ return 1
++ cut -c50-
++ 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'
++ printf %s 'bind-key    -T prefix       c                     new-window'
+ right=' new-window'
+ eval 'tmux bind-key    -T prefix       c                       new-window'
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T root         MouseDown3Status      display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y S "Swap Left" l "swap-window -t:-1" "Swap Right" r "swap-window -t:+1" "#{?pane_marked_set,,-}Swap Marked" s swap-window Kill X kill-window Respawn R "respawn-window -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" Rename n "command-prompt -I \"#W\" \"rename-window -- '\''%%'\''\"" "New After" w "new-window -a" "New At End" W new-window' ']'
++ printf %s 'bind-key    -T root         MouseDown3Status      display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y S "Swap Left" l "swap-window -t:-1" "Swap Right" r "swap-window -t:+1" "#{?pane_marked_set,,-}Swap Marked" s swap-window Kill X kill-window Respawn R "respawn-window -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" Rename n "command-prompt -I \"#W\" \"rename-window -- '\''%%'\''\"" "New After" w "new-window -a" "New At End" W new-window'
++ cut -c-50
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
+ left='bind-key    -T root         MouseDown3Status      '
+ _is_enabled false
+ '[' xfalse = xenabled ']'
+ '[' xfalse = xtrue ']'
+ '[' xfalse = xyes ']'
+ '[' xfalse = x1 ']'
+ return 1
++ printf %s 'bind-key    -T root         MouseDown3Status      display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y S "Swap Left" l "swap-window -t:-1" "Swap Right" r "swap-window -t:+1" "#{?pane_marked_set,,-}Swap Marked" s swap-window Kill X kill-window Respawn R "respawn-window -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" Rename n "command-prompt -I \"#W\" \"rename-window -- '\''%%'\''\"" "New After" w "new-window -a" "New At End" W new-window'
++ cut -c50-
++ 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=' display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y S "Swap Left" l "swap-window -t:-1" "Swap Right" r "swap-window -t:+1" "#{?pane_marked_set,,-}Swap Marked" s swap-window Kill X kill-window Respawn R "respawn-window -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" Rename n "command-prompt -I \"#W\" \"rename-window -- '\''%%'\''\"" "New After" w "new-window -a" "New At End" W new-window'
+ eval 'tmux bind-key    -T root         MouseDown3Status        display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y S "Swap Left" l "swap-window -t:-1" "Swap Right" r "swap-window -t:+1" "#{?pane_marked_set,,-}Swap Marked" s swap-window Kill X kill-window Respawn R "respawn-window -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" Rename n "command-prompt -I \"#W\" \"rename-window -- '\''%%'\''\"" "New After" w "new-window -a" "New At End" W new-window'
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T root         MouseDown3StatusLeft  display-menu -T "#[align=centre]#{session_name}" -t = -x M -y S Next n "switch-client -n" Previous p "switch-client -p" Renumber N "move-window -r" Rename n "command-prompt -I \"#S\" \"rename-session -- '\''%%'\''\"" "New Session" s new-session "New Window" w new-window' ']'
++ printf %s 'bind-key    -T root         MouseDown3StatusLeft  display-menu -T "#[align=centre]#{session_name}" -t = -x M -y S Next n "switch-client -n" Previous p "switch-client -p" Renumber N "move-window -r" Rename n "command-prompt -I \"#S\" \"rename-session -- '\''%%'\''\"" "New Session" s new-session "New Window" w new-window'
++ cut -c-50
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
+ left='bind-key    -T root         MouseDown3StatusLeft  '
+ _is_enabled false
+ '[' xfalse = xenabled ']'
+ '[' xfalse = xtrue ']'
+ '[' xfalse = xyes ']'
+ '[' xfalse = x1 ']'
+ return 1
++ printf %s 'bind-key    -T root         MouseDown3StatusLeft  display-menu -T "#[align=centre]#{session_name}" -t = -x M -y S Next n "switch-client -n" Previous p "switch-client -p" Renumber N "move-window -r" Rename n "command-prompt -I \"#S\" \"rename-session -- '\''%%'\''\"" "New Session" s new-session "New Window" w new-window'
++ cut -c50-
++ 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=' display-menu -T "#[align=centre]#{session_name}" -t = -x M -y S Next n "switch-client -n" Previous p "switch-client -p" Renumber N "move-window -r" Rename n "command-prompt -I \"#S\" \"rename-session -- '\''%%'\''\"" "New Session" s new-session "New Window" w new-window'
+ eval 'tmux bind-key    -T root         MouseDown3StatusLeft    display-menu -T "#[align=centre]#{session_name}" -t = -x M -y S Next n "switch-client -n" Previous p "switch-client -p" Renumber N "move-window -r" Rename n "command-prompt -I \"#S\" \"rename-session -- '\''%%'\''\"" "New Session" s new-session "New Window" w new-window'
+ IFS=
+ read -r line
+ tmux_conf_new_pane_retain_current_path=true
++ grep -e 'split\(-\|_\)window'
++ tmux list-keys
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T prefix       \"                    split-window' ']'
++ printf %s 'bind-key    -T prefix       \"                    split-window'
++ cut -c-50
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
+ left='bind-key    -T prefix       \\\"                    '
+ _is_enabled true
+ '[' xtrue = xenabled ']'
+ '[' xtrue = xtrue ']'
+ return 0
++ printf %s 'bind-key    -T prefix       \"                    split-window'
++ cut -c50-
++ 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'
+ right=' split-window -c "#{pane_current_path}"'
+ eval 'tmux bind-key    -T prefix       \\\"                      split-window -c "#{pane_current_path}"'
+ true
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T prefix       %                     split-window -h -c "#{pane_current_path}"' ']'
++ printf %s 'bind-key    -T prefix       %                     split-window -h -c "#{pane_current_path}"'
++ cut -c-50
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
+ left='bind-key    -T prefix       %                     '
+ _is_enabled true
+ '[' xtrue = xenabled ']'
+ '[' xtrue = xtrue ']'
+ return 0
++ printf %s 'bind-key    -T prefix       %                     split-window -h -c "#{pane_current_path}"'
++ cut -c50-
++ 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'
+ right=' split-window -h -c "#{pane_current_path}"'
+ eval 'tmux bind-key    -T prefix       %                       split-window -h -c "#{pane_current_path}"'
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T prefix       -                     split-window -v -c "#{pane_current_path}"' ']'
++ printf %s 'bind-key    -T prefix       -                     split-window -v -c "#{pane_current_path}"'
++ cut -c-50
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
+ left='bind-key    -T prefix       -                     '
+ _is_enabled true
+ '[' xtrue = xenabled ']'
+ '[' xtrue = xtrue ']'
+ return 0
++ printf %s 'bind-key    -T prefix       -                     split-window -v -c "#{pane_current_path}"'
++ cut -c50-
++ 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'
+ right=' split-window -v -c "#{pane_current_path}"'
+ eval 'tmux bind-key    -T prefix       -                       split-window -v -c "#{pane_current_path}"'
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T prefix       _                     split-window -h -c "#{pane_current_path}"' ']'
++ printf %s 'bind-key    -T prefix       _                     split-window -h -c "#{pane_current_path}"'
++ cut -c-50
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
+ left='bind-key    -T prefix       _                     '
+ _is_enabled true
+ '[' xtrue = xenabled ']'
+ '[' xtrue = xtrue ']'
+ return 0
++ printf %s 'bind-key    -T prefix       _                     split-window -h -c "#{pane_current_path}"'
++ cut -c50-
++ 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'
+ right=' split-window -h -c "#{pane_current_path}"'
+ eval 'tmux bind-key    -T prefix       _                       split-window -h -c "#{pane_current_path}"'
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T prefix       M-m                   display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -x P -y P "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r "copy-mode -t=; send -Xt= search-backward \"#{q:mouse_word}\"" "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y "send-keys -l -- \"#{q:mouse_word}\"" "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c "set-buffer -- \"#{q:mouse_word}\"" "#{?mouse_line,Copy Line,}" l "set-buffer -- \"#{q:mouse_line}\"" "Horizontal Split" h "split-window -h -c #{pane_current_path}" "Vertical Split" v "split-window -v -c #{pane_current_path}" "Swap Up" u "swap-pane -U" "Swap Down" d "swap-pane -D" "#{?pane_marked_set,,-}Swap Marked" s swap-pane Kill X kill-pane Respawn R "respawn-pane -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" "#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"' ']'
++ printf %s 'bind-key    -T prefix       M-m                   display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -x P -y P "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r "copy-mode -t=; send -Xt= search-backward \"#{q:mouse_word}\"" "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y "send-keys -l -- \"#{q:mouse_word}\"" "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c "set-buffer -- \"#{q:mouse_word}\"" "#{?mouse_line,Copy Line,}" l "set-buffer -- \"#{q:mouse_line}\"" "Horizontal Split" h "split-window -h -c #{pane_current_path}" "Vertical Split" v "split-window -v -c #{pane_current_path}" "Swap Up" u "swap-pane -U" "Swap Down" d "swap-pane -D" "#{?pane_marked_set,,-}Swap Marked" s swap-pane Kill X kill-pane Respawn R "respawn-pane -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" "#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"'
++ cut -c-50
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
+ left='bind-key    -T prefix       M-m                   '
+ _is_enabled true
+ '[' xtrue = xenabled ']'
+ '[' xtrue = xtrue ']'
+ return 0
++ printf %s 'bind-key    -T prefix       M-m                   display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -x P -y P "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r "copy-mode -t=; send -Xt= search-backward \"#{q:mouse_word}\"" "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y "send-keys -l -- \"#{q:mouse_word}\"" "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c "set-buffer -- \"#{q:mouse_word}\"" "#{?mouse_line,Copy Line,}" l "set-buffer -- \"#{q:mouse_line}\"" "Horizontal Split" h "split-window -h -c #{pane_current_path}" "Vertical Split" v "split-window -v -c #{pane_current_path}" "Swap Up" u "swap-pane -U" "Swap Down" d "swap-pane -D" "#{?pane_marked_set,,-}Swap Marked" s swap-pane Kill X kill-pane Respawn R "respawn-pane -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" "#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"'
++ cut -c50-
++ 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'
+ right=' display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -x P -y P "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r "copy-mode -t=; send -Xt= search-backward \""#{q:mouse_word}"\"" "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y "send-keys -l -- \""#{q:mouse_word}"\"" "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c "set-buffer -- \""#{q:mouse_word}"\"" "#{?mouse_line,Copy Line,}" l "set-buffer -- \""#{q:mouse_line}"\"" "Horizontal Split" h "split-window -h -c #{pane_current_path}" "Vertical Split" v "split-window -v -c #{pane_current_path}" "Swap Up" u "swap-pane -U" "Swap Down" d "swap-pane -D" "#{?pane_marked_set,,-}Swap Marked" s swap-pane Kill X kill-pane Respawn R "respawn-pane -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" "#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"'
+ eval 'tmux bind-key    -T prefix       M-m                     display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -x P -y P "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r "copy-mode -t=; send -Xt= search-backward \""#{q:mouse_word}"\"" "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y "send-keys -l -- \""#{q:mouse_word}"\"" "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c "set-buffer -- \""#{q:mouse_word}"\"" "#{?mouse_line,Copy Line,}" l "set-buffer -- \""#{q:mouse_line}"\"" "Horizontal Split" h "split-window -h -c #{pane_current_path}" "Vertical Split" v "split-window -v -c #{pane_current_path}" "Swap Up" u "swap-pane -U" "Swap Down" d "swap-pane -D" "#{?pane_marked_set,,-}Swap Marked" s swap-pane Kill X kill-pane Respawn R "respawn-pane -k" "#{?pane_marked,Unmark,Mark}" m "select-pane -m" "#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"'
+ IFS=
+ read -r line
+ '[' -z 'bind-key    -T root         MouseDown3Pane        if-shell -F -t = "#{||:#{mouse_any_flag},#{pane_in_mode}}" "select-pane -t=; send-keys -M" "display-menu -t= -xM -yM -T \"#[align=centre]#{pane_index} (#{pane_id})\"  '\''#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-r'\'' {copy-mode -t=; send -Xt= search-backward \"#{q:mouse_word}\"} '\''#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-y'\'' {send-keys -l -- \"#{q:mouse_word}\"} '\''#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}'\'' '\''c'\'' {set-buffer -- \"#{q:mouse_word}\"} '\''#{?mouse_line,Copy Line,}'\'' '\''l'\'' {set-buffer -- \"#{q:mouse_line}\"} '\'''\'' '\''Horizontal Split'\'' '\''h'\'' {split-window -h} '\''Vertical Split'\'' '\''v'\'' {split-window -v} '\'''\'' '\''Swap Up'\'' '\''u'\'' {swap-pane -U} '\''Swap Down'\'' '\''d'\'' {swap-pane -D} '\''#{?pane_marked_set,,-}Swap Marked'\'' '\''s'\'' {swap-pane} '\'''\'' '\''Kill'\'' '\''X'\'' {kill-pane} '\''Respawn'\'' '\''R'\'' {respawn-pane -k} '\''#{?pane_marked,Unmark,Mark}'\'' '\''m'\'' {select-pane -m} '\''#{?window_zoomed_flag,Unzoom,Zoom}'\'' '\''z'\'' {resize-pane -Z}"' ']'
++ printf %s 'bind-key    -T root         MouseDown3Pane        if-shell -F -t = "#{||:#{mouse_any_flag},#{pane_in_mode}}" "select-pane -t=; send-keys -M" "display-menu -t= -xM -yM -T \"#[align=centre]#{pane_index} (#{pane_id})\"  '\''#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-r'\'' {copy-mode -t=; send -Xt= search-backward \"#{q:mouse_word}\"} '\''#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-y'\'' {send-keys -l -- \"#{q:mouse_word}\"} '\''#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}'\'' '\''c'\'' {set-buffer -- \"#{q:mouse_word}\"} '\''#{?mouse_line,Copy Line,}'\'' '\''l'\'' {set-buffer -- \"#{q:mouse_line}\"} '\'''\'' '\''Horizontal Split'\'' '\''h'\'' {split-window -h} '\''Vertical Split'\'' '\''v'\'' {split-window -v} '\'''\'' '\''Swap Up'\'' '\''u'\'' {swap-pane -U} '\''Swap Down'\'' '\''d'\'' {swap-pane -D} '\''#{?pane_marked_set,,-}Swap Marked'\'' '\''s'\'' {swap-pane} '\'''\'' '\''Kill'\'' '\''X'\'' {kill-pane} '\''Respawn'\'' '\''R'\'' {respawn-pane -k} '\''#{?pane_marked,Unmark,Mark}'\'' '\''m'\'' {select-pane -m} '\''#{?window_zoomed_flag,Unzoom,Zoom}'\'' '\''z'\'' {resize-pane -Z}"'
++ cut -c-50
++ sed -E -e 's/[^ \ta-zA-Z0-9,._+@%/-]/\\&/g'
+ left='bind-key    -T root         MouseDown3Pane        '
+ _is_enabled true
+ '[' xtrue = xenabled ']'
+ '[' xtrue = xtrue ']'
+ return 0
++ printf %s 'bind-key    -T root         MouseDown3Pane        if-shell -F -t = "#{||:#{mouse_any_flag},#{pane_in_mode}}" "select-pane -t=; send-keys -M" "display-menu -t= -xM -yM -T \"#[align=centre]#{pane_index} (#{pane_id})\"  '\''#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-r'\'' {copy-mode -t=; send -Xt= search-backward \"#{q:mouse_word}\"} '\''#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-y'\'' {send-keys -l -- \"#{q:mouse_word}\"} '\''#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}'\'' '\''c'\'' {set-buffer -- \"#{q:mouse_word}\"} '\''#{?mouse_line,Copy Line,}'\'' '\''l'\'' {set-buffer -- \"#{q:mouse_line}\"} '\'''\'' '\''Horizontal Split'\'' '\''h'\'' {split-window -h} '\''Vertical Split'\'' '\''v'\'' {split-window -v} '\'''\'' '\''Swap Up'\'' '\''u'\'' {swap-pane -U} '\''Swap Down'\'' '\''d'\'' {swap-pane -D} '\''#{?pane_marked_set,,-}Swap Marked'\'' '\''s'\'' {swap-pane} '\'''\'' '\''Kill'\'' '\''X'\'' {kill-pane} '\''Respawn'\'' '\''R'\'' {respawn-pane -k} '\''#{?pane_marked,Unmark,Mark}'\'' '\''m'\'' {select-pane -m} '\''#{?window_zoomed_flag,Unzoom,Zoom}'\'' '\''z'\'' {resize-pane -Z}"'
++ cut -c50-
++ 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'
+ right=' if-shell -F -t = "#{||:#{mouse_any_flag},#{pane_in_mode}}" "select-pane -t=; send-keys -M" "display-menu -t= -xM -yM -T \"#[align=centre]"#{pane_index} (#{pane_id}")\"  '\''#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-r'\'' {copy-mode -t=; send -Xt= search-backward \""#{q:mouse_word}"\"} '\''#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-y'\'' {send-keys -l -- \""#{q:mouse_word}"\"} '\''#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}'\'' '\''c'\'' {set-buffer -- \""#{q:mouse_word}"\"} '\''#{?mouse_line,Copy Line,}'\'' '\''l'\'' {set-buffer -- \""#{q:mouse_line}"\"} '\'''\'' '\''Horizontal Split'\'' '\''h'\'' {split-window -h -c "#{pane_current_path}"} '\''Vertical Split'\'' '\''v'\'' {split-window -v -c "#{pane_current_path}"} '\'''\'' '\''Swap Up'\'' '\''u'\'' {swap-pane -U} '\''Swap Down'\'' '\''d'\'' {swap-pane -D} '\''#{?pane_marked_set,,-}Swap Marked'\'' '\''s'\'' {swap-pane} '\'''\'' '\''Kill'\'' '\''X'\'' {kill-pane} '\''Respawn'\'' '\''R'\'' {respawn-pane -k} '\''#{?pane_marked,Unmark,Mark}'\'' '\''m'\'' {select-pane -m} '\''#{?window_zoomed_flag,Unzoom,Zoom}'\'' '\''z'\'' {resize-pane -Z}"'
+ eval 'tmux bind-key    -T root         MouseDown3Pane          if-shell -F -t = "#{||:#{mouse_any_flag},#{pane_in_mode}}" "select-pane -t=; send-keys -M" "display-menu -t= -xM -yM -T \"#[align=centre]"#{pane_index} (#{pane_id}")\"  '\''#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-r'\'' {copy-mode -t=; send -Xt= search-backward \""#{q:mouse_word}"\"} '\''#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}'\'' '\''C-y'\'' {send-keys -l -- \""#{q:mouse_word}"\"} '\''#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}'\'' '\''c'\'' {set-buffer -- \""#{q:mouse_word}"\"} '\''#{?mouse_line,Copy Line,}'\'' '\''l'\'' {set-buffer -- \""#{q:mouse_line}"\"} '\'''\'' '\''Horizontal Split'\'' '\''h'\'' {split-window -h -c "#{pane_current_path}"} '\''Vertical Split'\'' '\''v'\'' {split-window -v -c "#{pane_current_path}"} '\'''\'' '\''Swap Up'\'' '\''u'\'' {swap-pane -U} '\''Swap Down'\'' '\''d'\'' {swap-pane -D} '\''#{?pane_marked_set,,-}Swap Marked'\'' '\''s'\'' {swap-pane} '\'''\'' '\''Kill'\'' '\''X'\'' {kill-pane} '\''Respawn'\'' '\''R'\'' {respawn-pane -k} '\''#{?pane_marked,Unmark,Mark}'\'' '\''m'\'' {select-pane -m} '\''#{?window_zoomed_flag,Unzoom,Zoom}'\'' '\''z'\'' {resize-pane -Z}"'
</details

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (10 by maintainers)

Commits related to this issue

Most upvoted comments

Hello @bertin0 and @Orkat 👋

I would appreciate if you could test the gh-254 branch

Please make sure you completely stop tmux (kill all server processes etc) before switching to that branch ⚠️

Thanks in advance for your help 🙏

@mattysweeps Yeah this configuration does:

  • tmux list-keys to find out which are the current bindings
  • depending on configuration variables, it modifies existing bindings into new ones, e.g. to inject -c '#{pane_current_path}' into split-window bindings

Parsing bindings with regexes is fragile at best, and the current implementation fails when parsing the new syntax and bindings introduced in tmux 3.0.

The implementation in the gh-254 branch, while still not being a proper configuration parser, does its best to be more robust and works with the new display-menu command.

So yeah I think you should close tmux/tmux#1882

Works great with the gh-254 branch!

@mattysweeps I fixed a little bug in tmux 2 days ago that made tmux truncate the output of list-keys. I’ll merge the branch when tmux is ready for it, which likely is when tmux 3.0 is released 🙂

Sorry for not replying… Ive been away from a proper computer for the past month… The current setup works perfectly! Thanks!