gpakosz / .tmux

🇫🇷 Oh my tmux! My self-contained, pretty & versatile tmux configuration made with ❤️
MIT License
21.99k stars 3.37k forks source link

<prefix> e does not open the .tmux.conf.local #620

Closed shelper closed 1 year ago

shelper commented 1 year ago

I have installed .tmux, it was working but then i dont know what happend, suddenly <prefix> + e does not open .tmux.conf.local. even after a reinstallation

I think the only thing i did is installed neovim. and set the following to nvim

➜  ~ echo $VISUAL
nvim
➜  ~ echo $EDITOR
nvim

is there a way to debug this to figure out what is causing that?

gpakosz commented 1 year ago

Hello @shelper 👋

From the command line, you can try

sh -cx '${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"'

What does it do?

shelper commented 1 year ago

it opens the config file, no problem....

shelper commented 1 year ago

but there are outputs like below

+ nvim /home/username/.tmux.conf.local
+ tmux source /home/username/.tmux.conf
/tmp/tmp.W4TRMsr05U.in:11: syntax error
+ tmux display ~/.tmux.conf sourced
gpakosz commented 1 year ago

There's something else not working when sourcing the configuration file.

Are you sure your .tmux.conf file is unmodified?

Are you using the latest version of Oh my tmux!?

Which version of tmux are you using?

shelper commented 1 year ago
➜  .tmux git:(master) git st
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
➜  .tmux git:(master) cd ..
➜  ~ ls -lat .tmux.conf
lrwxrwxrwx 1 username username 16 Jan 25 08:25 .tmux.conf -> .tmux/.tmux.conf
➜  ~ sh -cx '${EDITOR:-vim} ~/.tmux.conf.local && tmux source ~/.tmux.conf && tmux display "~/.tmux.conf sourced"'
+ nvim /home/username/.tmux.conf.local
+ tmux source /home/username/.tmux.conf
/tmp/tmp.qhP0SpDSvV.in:11: syntax error
+ tmux display ~/.tmux.conf sourced
➜  ~ tmux -V
tmux 3.2a
gpakosz commented 1 year ago

Can you please

shelper commented 1 year ago

commit id confimed, there are two commented lines like with cfg=$(mktemp) && trap 'rm -f $cfg*' EXIT same as here at https://github.com/gpakosz/.tmux/blob/master/.tmux.conf no non-comment line like you mentioned above, but i did replace the lines anyway, and below are the outputs

+ :
+ set -e
+ unset GREP_OPTIONS
+ export LC_NUMERIC=C
+ set +H
+ true
+ printf
+ sed -E s///
+ uname -s
+ _uname_s=Linux
+ tmux -V
+ awk {gsub(/[^0-9.]/, "", $2); print ($2+0) * 100}
+ _tmux_version=320
+ command -v pkill
+ _apply_bindings
+ cfg/tmp/tmux.conf
sh: 736: cfg/tmp/tmux.conf: not found
gpakosz commented 1 year ago

Bah I made a typo 😐

The line should be

cfg=/tmp/tmux.conf

Sorry, can you please try again?

shelper commented 1 year ago

output as below

+ :
+ set -e
+ unset GREP_OPTIONS
+ export LC_NUMERIC=C
+ set +H
+ true
+ printf
+ sed -E s///
+ uname -s
+ _uname_s=Linux
+ tmux -V
+ awk {gsub(/[^0-9.]/, "", $2); print ($2+0) * 100}
+ _tmux_version=320
+ command -v pkill
+ _apply_bindings
+ cfg=/tmp/tmux.conf
+ tmux list-keys
+ grep -vF tmux.conf.local
+ grep -E new-window|split(-|_)window|new-session|copy-selection|copy-pipe
+ perl -p -i -e s/'#\{\?window_zoomed_flag,Unzoom,Zoom\}' 'z' \{resize-pane -$/'#{?window_zoomed_flag,Unzoom,Zoom}' 'z' {resize-pane -Z}"/g /tmp/tmux.conf
+ tmux_conf_new_window_retain_current_path=false
+ _is_disabled false
+ [ xfalse = xdisabled ]
+ perl -p -i -e
      s/\bnew-window\b([^;}\n]*?)(?:\s+-c\s+((?:\\")?|"?|'?)#\{pane_current_path\}\2)/new-window\1/g /tmp/tmux.conf
+ tmux_conf_new_pane_retain_current_path=true
+ _is_disabled true
+ [ xtrue = xdisabled ]
+ perl -p -i -e
      s/\brun-shell\b\s+("|')cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+#\{b:pane_tty\}([^\n\1]*)(\s+-c\s+((?:\\")?|"?|'?)#\{pane_current_path\}\4)([^\n\1]*)\1/run-shell \1cut -c3- ~\/.tmux.conf | sh -s _split_window #{pane_pid} #{b:pane_tty}\2\5\1/g
      ;
      s/\brun-shell\b(\s+((?:\\")?|"?|'?)cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window\s+((?:\\")?|"?|'?)#\{b:pane_tty\}\3)(.*?)\2/split-window\4/g
      ;
      s/\bsplit-window\b([^;}\n]*?)(?:\s+-c\s+((?:\\")?|"?|'?)#\{pane_current_path\}\2)/split-window\1/g /tmp/tmux.conf
+ _is_disabled false
+ [ xfalse = xdisabled ]
+ _is_true false
+ [ xfalse = xtrue ]
+ [ xfalse = xyes ]
+ [ xfalse = x1 ]
+ perl -p -i -e
    s/\bsplit-window\b((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!\bssh\b)[^\s]+))*)?(?:\s+(\bssh\b))((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!\bssh\b)[^\s]+))*)?/run-shell 'cut -c3- ~\/\.tmux\.conf | sh -s _split_window_ssh #\{pane_pid\} #\{b:pane_tty\}\1'/g if /\bsplit-window\b((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!ssh)[^\s]+))*)?(?:\s+(ssh))((?:(?:[ \t]+-[bdfhIvP])|(?:[ \t]+-[celtF][ \t]+(?!ssh)[^\s]+))*)?/ /tmp/tmux.conf
+ tmux_conf_new_pane_reconnect_ssh=false
+ _is_disabled false
+ [ xfalse = xdisabled ]
+ _is_true false
+ [ xfalse = xtrue ]
+ [ xfalse = xyes ]
+ [ xfalse = x1 ]
+ _is_disabled true
+ [ xtrue = xdisabled ]
+ _is_true true
+ [ xtrue = xtrue ]
+ perl -p -i -e
      s/\bsplit-window\b(?!\s+(?:-|}))/{$&}/g if /\bdisplay-menu\b/
      ;
      s/\bsplit-window\b/split-window -c '#{pane_current_path}'\1/g
      ;
      s/\brun-shell\b\s+'cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window(_ssh)?\s+#\{pane_pid\}\s+#\{b:pane_tty\}([^}\n']*)'/run-shell 'cut -c3- ~\/.tmux.conf | sh -s _split_window\1 #\{pane_pid\} #\{b:pane_tty\} -c \\"#\{pane_current_path\}\\"\2'/g if /\bdisplay-menu\b/
      ;
      s/\brun-shell\b\s+'cut\s+-c3-\s+~\/\.tmux\.conf\s+\|\s+sh\s+-s\s+_split_window(_ssh)?\s+#\{pane_pid\}\s+#\{b:pane_tty\}([^}\n']*)'/run-shell 'cut -c3- ~\/.tmux.conf | sh -s _split_window\1 #\{pane_pid\} #\{b:pane_tty\} -c "#\{pane_current_path\}"\2'/g /tmp/tmux.conf
+ tmux_conf_new_session_prompt=false
+ _is_disabled false
+ [ xfalse = xdisabled ]
+ _is_true false
+ [ xfalse = xtrue ]
+ [ xfalse = xyes ]
+ [ xfalse = x1 ]
+ perl -p -i -e s/\bcommand-prompt\s+-p\s+new-session\s+'new-session\s+-s\s+"%%"'/new-session/g /tmp/tmux.conf
+ tmux_conf_copy_to_os_clipboard=false
+ command -v xsel
+ command -v xsel
+ command -v xclip
+ command=xclip -i -selection clipboard > \/dev\/null 2>\&1
+ command -v wl-copy
+ command=wl-copy
+ command -v pbcopy
+ command -v reattach-to-user-namespace
+ command -v clip.exe
+ [ -c /dev/clipboard ]
+ [ -n wl-copy ]
+ _is_disabled false
+ [ xfalse = xdisabled ]
+ _is_true false
+ [ xfalse = xtrue ]
+ [ xfalse = xyes ]
+ [ xfalse = x1 ]
+ [ 320 -ge 320 ]
+ perl -p -i -e s/\bcopy-pipe(-and-cancel)?\b\s+("|')?wl-copy\2?/copy-pipe\1/g /tmp/tmux.conf
+ awk {i = $2 == "-T" ? 4 : 5; gsub(/^[;]$/, "\\\\&", $i); gsub(/^[$"#~]$/, "'&'", $i); gsub(/^[']$/, "\"&\"", $i); print}
+ tmux source-file /tmp/tmux.conf.in
/tmp/tmux.conf.in:11: syntax error
+ tmux source-file -v /dev/null
+ printf -- -v
+ verbose_flag=-v
+ tmux source-file -v /tmp/tmux.conf.in
+ out=/tmp/tmux.conf.in:11: syntax error
+ printf %s /tmp/tmux.conf.in:11: syntax error
+ tail -1
+ cut -d: -f2
+ line=11
+ perl -n -i -e if ($. != 11) { print } /tmp/tmux.conf.in
+ tmux source-file -v /tmp/tmux.conf.in
+ out=/tmp/tmux.conf.in:1: bind-key -T copy-mode C-o send-keys -X copy-pipe-and-cancel "sed s/##/####/g | xargs -I {} tmux send-keys 'vim -- \"{}\"'; tmux send-keys 'C-m'"
/tmp/tmux.conf.in:2: bind-key -T copy-mode C-w send-keys -X copy-pipe-and-cancel
/tmp/tmux.conf.in:3: bind-key -T copy-mode ! send-keys -X copy-pipe-and-cancel "tr -d '\n' | wl-copy"
/tmp/tmux.conf.in:4: bind-key -T copy-mode Y send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
/tmp/tmux.conf.in:5: bind-key -T copy-mode o send-keys -X copy-pipe-and-cancel "sed s/##/####/g | xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; xdg-open \"{}\" > /dev/null'"
/tmp/tmux.conf.in:6: bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel
/tmp/tmux.conf.in:7: bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel
/tmp/tmux.conf.in:8: bind-key -T copy-mode DoubleClick1Pane select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
/tmp/tmux.conf.in:9: bind-key -T copy-mode TripleClick1Pane select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
/tmp/tmux.conf.in:10: bind-key -T copy-mode M-w send-keys -X copy-pipe-and-cancel
/tmp/tmux.conf.in:11: bind-key -T copy-mode-vi C-j send-keys -X copy-pipe-and-cancel
/tmp/tmux.conf.in:12: bind-key -T copy-mode-vi Enter run-shell "tmux     send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
/tmp/tmux.conf.in:13: bind-key -T copy-mode-vi C-o send-keys -X copy-pipe-and-cancel "sed s/##/####/g | xargs -I {} tmux send-keys 'vim -- \"{}\"'; tmux send-keys 'C-m'"
/tmp/tmux.conf.in:14: bind-key -T copy-mode-vi ! run-shell "tmux     send-keys -X copy-pipe-and-cancel \"tr -d '\\n' | wl-copy\"; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
/tmp/tmux.conf.in:15: bind-key -T copy-mode-vi Y run-shell "tmux     send-keys -X copy-pipe-and-cancel \"tmux paste-buffer\"; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
/tmp/tmux.conf.in:16: bind-key -T copy-mode-vi o send-keys -X copy-pipe-and-cancel "sed s/##/####/g | xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; xdg-open \"{}\" > /dev/null'"
/tmp/tmux.conf.in:17: bind-key -T copy-mode-vi y run-shell "tmux     send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
/tmp/tmux.conf.in:18: bind-key -T copy-mode-vi MouseDragEnd1Pane run-shell "tmux     send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
/tmp/tmux.conf.in:19: bind-key -T copy-mode-vi DoubleClick1Pane run-shell "tmux     select-pane \\; send-keys -X select-word \\; run-shell -d 0.3 \\; send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
/tmp/tmux.conf.in:20: bind-key -T copy-mode-vi TripleClick1Pane run-shell "tmux     select-pane \\; send-keys -X select-line \\; run-shell -d 0.3 \\; send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
/tmp/tmux.conf.in:21: bind-key -T copy-mode-vi M-y run-shell "tmux     send-keys -X copy-pipe-and-cancel \"wl-copy; tmux paste-buffer\"; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
/tmp/tmux.conf.in:22: bind-key -T prefix C-c new-session
/tmp/tmux.conf.in:23: bind-key -T prefix \" split-window -c "#{pane_current_path}"
/tmp/tmux.conf.in:24: bind-key -T prefix % split-window -c "#{pane_current_path}" -h
/tmp/tmux.conf.in:25: bind-key -T prefix - split-window -c "#{pane_current_path}" -v
/tmp/tmux.conf.in:26: bind-key -T prefix _ split-window -c "#{pane_current_path}" -h
/tmp/tmux.conf.in:27: bind-key -T prefix c new-window
/tmp/tmux.conf.in:28: bind-key -T root MouseDown3Pane if-shell -F -t = "#{||:#{mouse_any_flag},#{&&:#{pane_in_mode},#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}}}" "select-pane -t= ; send -M" "display-menu -t= -xM -yM -T \"#[align=centre]#{pane_index} (#{pane_id})\" \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}\" < \"send -X history-top\" \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}\" > \"send -X history-bottom\" '' \"#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}\" C-r \"if -F \\\"#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}\\\" \\\"copy-mode -t=\\\" ; send -Xt= search-backward \\\"#{q:mouse_word}\\\"\" \"#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}\" C-y \"copy-mode -q ; send-keys -l -- \\\"#{q:mouse_word}\\\"\" \"#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}\" c \"copy-mode -q ; set-buffer -- \\\"#{q:mouse_word}\\\"\" \"#{?mouse_line,Copy Line,}\" l \"copy-mode -q ; set-buffer -- \\\"#{q:mouse_line}\\\"\" '' \"Horizontal Split\" h \"split-window -c '#{pane_current_path}' -h\" \"Vertical Split\" v \"split-window -c '#{pane_current_path}' -v\" '' \"#{?#{>:#{window_panes},1},,-}Swap Up\" u \"swap-pane -U\" \"#{?#{>:#{window_panes},1},,-}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_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}\" z \"resize-pane -Z\""
/tmp/tmux.conf.in:29: bind-key -T root MouseDown3Status display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y W "#{?#{>:#{session_windows},1},,-}Swap Left" l "swap-window -t:-1" "#{?#{>:#{session_windows},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
/tmp/tmux.conf.in:30: bind-key -T root MouseDown3StatusLeft display-menu -T "#[align=centre]#{session_name}" -t = -x M -y W 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
/tmp/tmux.conf.in:31: bind-key -T root DoubleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" "send -M" "copy-mode -H ; send -X select-word ; run -d0.3 ; send -X copy-pipe-and-cancel"
/tmp/tmux.conf.in:32: bind-key -T root TripleClick1Pane select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" "send -M" "copy-mode -H ; send -X select-line ; run -d0.3 ; send -X copy-pipe-and-cancel"
/tmp/tmux.conf.in:33: bind-key -T root M-MouseDown3Pane display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -t = -x M -y M "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < "send -X history-top" "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > "send -X history-bottom" '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r "if -F \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}\" \"copy-mode -t=\" ; send -Xt= search-backward \"#{q:mouse_word}\"" "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y "copy-mode -q ; send-keys -l -- \"#{q:mouse_word}\"" "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c "copy-mode -q ; set-buffer -- \"#{q:mouse_word}\"" "#{?mouse_line,Copy Line,}" l "copy-mode -q ; set-buffer -- \"#{q:mouse_line}\"" '' "Horizontal Split" h "split-window -c '#{pane_current_path}' -h" "Vertical Split" v "split-window -c '#{pane_current_path}' -v" '' "#{?#{>:#{window_panes},1},,-}Swap Up" u "swap-pane -U" "#{?#{>:#{window_panes},1},,-}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_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"
gpakosz commented 1 year ago

Can you please paste the content of /tmp/tmux.conf.in?

gpakosz commented 1 year ago

I cannot reproduce on macOS with tmux 3.2a and commit 12f96dac7cd4fa7c6aeebd46a2905f0c77c1d3ba

shelper commented 1 year ago

content of /tmp/tmux.conf.in

bind-key    -T copy-mode    C-o                  send-keys -X copy-pipe-and-cancel "sed s/##/####/g | xargs -I {} tmux send-keys 'vim -- \"{}\"'; tmux send-keys 'C-m'"
bind-key    -T copy-mode    C-w                  send-keys -X copy-pipe-and-cancel
bind-key    -T copy-mode    !                    send-keys -X copy-pipe-and-cancel "tr -d '\n' | wl-copy"
bind-key    -T copy-mode    Y                    send-keys -X copy-pipe-and-cancel "tmux paste-buffer"
bind-key    -T copy-mode    o                    send-keys -X copy-pipe-and-cancel "sed s/##/####/g | xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; xdg-open \"{}\" > /dev/null'"
bind-key    -T copy-mode    y                    send-keys -X copy-pipe-and-cancel
bind-key    -T copy-mode    MouseDragEnd1Pane    send-keys -X copy-pipe-and-cancel
bind-key    -T copy-mode    DoubleClick1Pane     select-pane \; send-keys -X select-word \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
bind-key    -T copy-mode    TripleClick1Pane     select-pane \; send-keys -X select-line \; run-shell -d 0.3 \; send-keys -X copy-pipe-and-cancel
bind-key    -T copy-mode    M-w                  send-keys -X copy-pipe-and-cancel
bind-key    -T copy-mode-vi C-j                  send-keys -X copy-pipe-and-cancel
bind-key    -T copy-mode-vi Enter                run-shell "tmux     send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
bind-key    -T copy-mode-vi C-o                  send-keys -X copy-pipe-and-cancel "sed s/##/####/g | xargs -I {} tmux send-keys 'vim -- \"{}\"'; tmux send-keys 'C-m'"
bind-key    -T copy-mode-vi !                    run-shell "tmux     send-keys -X copy-pipe-and-cancel \"tr -d '\\n' | wl-copy\"; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
bind-key    -T copy-mode-vi Y                    run-shell "tmux     send-keys -X copy-pipe-and-cancel \"tmux paste-buffer\"; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
bind-key    -T copy-mode-vi o                    send-keys -X copy-pipe-and-cancel "sed s/##/####/g | xargs -I {} tmux run-shell -b 'cd #{pane_current_path}; xdg-open \"{}\" > /dev/null'"
bind-key    -T copy-mode-vi y                    run-shell "tmux     send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
bind-key    -T copy-mode-vi MouseDragEnd1Pane    run-shell "tmux     send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
bind-key    -T copy-mode-vi DoubleClick1Pane     run-shell "tmux     select-pane \\; send-keys -X select-word \\; run-shell -d 0.3 \\; send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
bind-key    -T copy-mode-vi TripleClick1Pane     run-shell "tmux     select-pane \\; send-keys -X select-line \\; run-shell -d 0.3 \\; send-keys -X copy-pipe-and-cancel; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
bind-key    -T copy-mode-vi M-y                  run-shell "tmux     send-keys -X copy-pipe-and-cancel \"wl-copy; tmux paste-buffer\"; /home/username/.tmux/plugins/tmux-copycat/scripts/copycat_mode_quit.sh; true"
bind-key    -T prefix       C-c                  new-session
bind-key    -T prefix       \"                   split-window -c '#{pane_current_path}'
bind-key    -T prefix       %                    split-window -c '#{pane_current_path}' -h
bind-key    -T prefix       -                    split-window -c '#{pane_current_path}' -v
bind-key    -T prefix       _                    split-window -c '#{pane_current_path}' -h
bind-key    -T prefix       c                    new-window
bind-key    -T root         MouseDown3Pane       if-shell -F -t = "#{||:#{mouse_any_flag},#{&&:#{pane_in_mode},#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}}}" "select-pane -t= ; send -M" "display-menu -t= -xM -yM -T \"#[align=centre]#{pane_index} (#{pane_id})\" \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}\" < \"send -X history-top\" \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}\" > \"send -X history-bottom\" '' \"#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}\" C-r \"if -F \\\"#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}\\\" \\\"copy-mode -t=\\\" ; send -Xt= search-backward \\\"#{q:mouse_word}\\\"\" \"#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}\" C-y \"copy-mode -q ; send-keys -l -- \\\"#{q:mouse_word}\\\"\" \"#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}\" c \"copy-mode -q ; set-buffer -- \\\"#{q:mouse_word}\\\"\" \"#{?mouse_line,Copy Line,}\" l \"copy-mode -q ; set-buffer -- \\\"#{q:mouse_line}\\\"\" '' \"Horizontal Split\" h \"split-window -c '#{pane_current_path}' -h\" \"Vertical Split\" v \"split-window -c '#{pane_current_path}' -v\" '' \"#{?#{>:#{window_panes},1},,-}Swap Up\" u \"swap-pane -U\" \"#{?#{>:#{window_panes},1},,-}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_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}\" z \"resize-pane -Z\""
bind-key    -T root         MouseDown3Status     display-menu -T "#[align=centre]#{window_index}:#{window_name}" -t = -x W -y W "#{?#{>:#{session_windows},1},,-}Swap Left" l "swap-window -t:-1" "#{?#{>:#{session_windows},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
bind-key    -T root         MouseDown3StatusLeft display-menu -T "#[align=centre]#{session_name}" -t = -x M -y W 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
bind-key    -T root         DoubleClick1Pane     select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" "send -M" "copy-mode -H ; send -X select-word ; run -d0.3 ; send -X copy-pipe-and-cancel"
bind-key    -T root         TripleClick1Pane     select-pane -t = \; if-shell -F "#{||:#{pane_in_mode},#{mouse_any_flag}}" "send -M" "copy-mode -H ; send -X select-line ; run -d0.3 ; send -X copy-pipe-and-cancel"
bind-key    -T root         M-MouseDown3Pane     display-menu -T "#[align=centre]#{pane_index} (#{pane_id})" -t = -x M -y M "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Top,}" < "send -X history-top" "#{?#{m/r:(copy|view)-mode,#{pane_mode}},Go To Bottom,}" > "send -X history-bottom" '' "#{?mouse_word,Search For #[underscore]#{=/9/...:mouse_word},}" C-r "if -F \"#{?#{m/r:(copy|view)-mode,#{pane_mode}},0,1}\" \"copy-mode -t=\" ; send -Xt= search-backward \"#{q:mouse_word}\"" "#{?mouse_word,Type #[underscore]#{=/9/...:mouse_word},}" C-y "copy-mode -q ; send-keys -l -- \"#{q:mouse_word}\"" "#{?mouse_word,Copy #[underscore]#{=/9/...:mouse_word},}" c "copy-mode -q ; set-buffer -- \"#{q:mouse_word}\"" "#{?mouse_line,Copy Line,}" l "copy-mode -q ; set-buffer -- \"#{q:mouse_line}\"" '' "Horizontal Split" h "split-window -c '#{pane_current_path}' -h" "Vertical Split" v "split-window -c '#{pane_current_path}' -v" '' "#{?#{>:#{window_panes},1},,-}Swap Up" u "swap-pane -U" "#{?#{>:#{window_panes},1},,-}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_panes},1},,-}#{?window_zoomed_flag,Unzoom,Zoom}" z "resize-pane -Z"
gpakosz commented 1 year ago

Line 11 is

bind-key    -T copy-mode-vi C-j                  send-keys -X copy-pipe-and-cancel

My tmux 3.2a can ingest it just fine.

Can you please try to isolate which line is causing $ tmux source to be unhappy?

shelper commented 1 year ago

i think i found the reason, i use keyboard remapping tool remapped C-j to key after i remove that, everything works.

gpakosz commented 1 year ago

i think i found the reason, i use keyboard remapping tool remapped C-j to key after i remove that, everything works.

I don't get it. Can you please explain with more details?

shelper commented 1 year ago

i dont know if that is related, i use Autohotkey to modify my C-j to be key, i saw the error is from line 11 where it sends key C-j, i thought it might be related, so i disabled the modification of C-j, and everything works....

but then i enabled the modification again, everything still works ...,

i didnt change anything and i dont know why, the only thing i can think of is autohotkey incept C-j maybe?

gpakosz commented 1 year ago

No I believe what happened is that you had an old tmux server process still running