kutsan / zsh-system-clipboard

System clipboard key bindings for Zsh Line Editor with vi mode. It is similar to what `set clipboard=unnamed` does for vim.
GNU General Public License v3.0
149 stars 16 forks source link

Tmux set-buffer can't handle spaces #19

Closed ajholyoake closed 5 years ago

ajholyoake commented 5 years ago

My system:

OSX High Sierra Tmux 2.8 zsh 5.7.1 (x86_64-apple-darwin17.7.0) antigen / oh-my-zsh

The line
tee >(tmux set-buffer -- $(cat -)) | _zsh_system_clipboard_set returns a usage error when used with multiple words usage: set-buffer [-a] [-b buffer-name] [-n new-buffer-name] data

I notice this particularly when using 'D' to delete to end of line.

I fixed this by changing the line to tee >(tmux set-buffer -- "$(cat -)") | _zsh_system_clipboard_set

ajholyoake commented 5 years ago

Sorry about the noise - I realised my first attempt at fixing this was just putting a temporary file in the buffer.