You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The issue was caused by incorrect parameter expansion.
Copycat saves the old bindings inside
/tmp/copycat_$(whoami)_recover_keys as they were provided on the command
line, e.g.
$ cat /tmp/copycat_$(whoami)_recover_keys | grep clipboard
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"
When tmux-copycat restores the config it reads each line of that
temporary file into `key_cmd` and runs `tmux $key_cmd`. Now, when the
shell expands `$key_cmd` it expands `"xclip`, `-selection`, `clipboard"`
into separate words. `tmux $key_cmd` runs effectively as:
tmux bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "\"xclip" -selection "clipboard\""
Which is not what we want.
In order to fix this bug, this commit makes sure that a proper shell
expansion happens by using `sh -c`.
0 commit comments