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

`xclip -in` keeps running after zsh exits and never dies unless killed manually #46

Open cronyakatsuki opened 1 year ago

cronyakatsuki commented 1 year ago

After doing any action in zsh vi mode like copy, paste it makes it so that when running exit zsh just hangs there and won't exit until killed.

Using xclip if it matters.

doronbehar commented 1 year ago

I too noticed the command xclip -sel CLIPBOARD -in hangs when the process exits. It seems like an issue with xclip.. I'd switch to xsel, or wayland if I could.

cronyakatsuki commented 1 year ago

I have xclip and xsel installed at the machine at the same time, because of dependencies of some of my program.

Maybe make it so that xsel is prioritized over xclip if they are both found to be installed at the same time?

For now I will just use ZSH_SYSTEM_CLIPBOARD_METHOD=xsc to bypass the issue.

cronyakatsuki commented 1 year ago

Should we close the issue now and have a mention that if zsh hangs users should install xsel in the readme now?

doronbehar commented 1 year ago

Should we close the issue now and have a mention that if zsh hangs users should install xsel in the readme now?

I'd appreciate a PR to the README linking to this issue, but I wouldn't close this issue.