copy-mode y not working on cygwin
Hi,
I'm using tmux 2.4 on up to date cygwin x86 on windows 7. For some reason copy-mode y and prefix-y is not working using clip.exe (default):
bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel clip.exe
It acts like its working but simply does not... no error I can see.
I've tried testing clip with echo testing | clip and that works.
I've also since added putclip and getclip via cygutils-extra and tried the override in config:
set -g @override_copy_command 'putclip'
I check tmux bindings after reload and it still is trying to use clip.exe for some reason so there might be issue with override or I'm doing it wrong?
Finally I simply resorted to overriding the bindings with putclip which works:
run-shell ~/dotfiles/tmux-yank/yank.tmux set -g @override_copy_command 'putclip' bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel putclip bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel putclip
@dhatch48 just a heads up, but I didn't need those if you do the set -g before the run shell.
The problem is that clip.exe actually exists and using cat | clip.exe in a variable does not seem to work properly in Cygwin:
~/.tmux/plugins/tmux-yank> which clip.exe
/cygdrive/c/Windows/System32/clip.exe
~/.tmux/plugins/tmux-yank> source scripts/helpers.sh
~/.tmux/plugins/tmux-yank> copy_command="$(clipboard_copy_command)"
~/.tmux/plugins/tmux-yank> echo "$copy_command"
cat | clip.exe
~/.tmux/plugins/tmux-yank> echo lol | tr -d '\n' | $copy_command
cat: '|': No such file or directory
cat: clip.exe: No such file or directory
@kgraefe You can try your example even in Linux you will get the same error (provided that copy_command contains a pipe).
I think the issue is already solved because I tried the plugin in cygwin and it was working.