tony / tmux-config

:green_book: Example tmux configuration - screen + vim key-bindings, system stat, cpu load bar.
http://tony.github.com/tmux-config/
1.81k stars 478 forks source link

.tmux.conf:100: syntax error on `Ubuntu 20.04` #49

Closed yankeguo closed 4 years ago

yankeguo commented 4 years ago

Ubuntu 20.04 comes with tmux 3.0a, which prompts syntax error on line 100

williamn commented 4 years ago

👍

gzcf commented 4 years ago

Change

if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind %; bind % split-window -h -c "#{pane_current_path}"'

to

if-shell "test '#{$TMUX_VERSION_MAJOR} -gt 1 -o \( #{$TMUX_VERSION_MAJOR} -eq 1 -a #{$TMUX_VERSION_MINOR} -ge 8 \)'" 'unbind "%"; bind % split-window -h -c "#{pane_current_path}"'

Notice the double quote around %.

This works with tmux 3.1b on MacOS. (disclaimer: didn't test with other versions yet)

yankeguo commented 4 years ago

@gzcf It works !!! thanks

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This bot is used to handle issues where the issue hasn't been discussed or has gone out of date. If an issue isn't resolved and handled in a certain period of time, it may be closed. If you would like your issue re-opened, please create a fresh issue with the latest, up to date information and mention this issue in it.