As of tmux 2.6,
bind-key no longer takes a mode-table option (
-t). Instead, there is a a key-table (
-T) for each mode.
Additionally, commands can't be used directly in copy-mode bindings. They have to be sent with
From comments on tmux issue 754:
- prefix the command with
Furthermore, from version 2.4 onwards, the new command
copy-pipe-and-cancel leaves copy mode, while
copy-pipe keeps it active.
So that line in your
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -sel clip -i"
Garbage printed to the screen
Depending on your terminal emulator, you may also see some characters dumped to the screen after using this binding. This is down to the
Attempt to set the terminal clipboard content using the xterm(1) escape sequence, if there is an Ms entry in the terminfo(5) description (see the TERMINFO EXTENSIONS section).
It appears that some terminals (such as LXTerminal) will set TERM to
xterm (which supports this extension), but don't actually recognise the sequence.
copy-pipe-and-cancel will "helpfully" attempt to use this feature, and the terminal simply displays the resulting characters. What you're seeing is the escape sequence followed by the base64-encoding of the selected text.
If your terminal is one that mishandles this escape sequence, you can disable it with
set-option -g set-clipboard off