fish-shell/share
Johannes Altmanninger b3444ea128 Work around ctrl-c in VSCode killing wl-copy and clearing clipboard
wl-copy is a daemon process that serves its stdin to any wl-paste processes.
On Wayland, we launch it from fish_clipboard_copy.  It then lives in the
same process group as fish (see `ps -o pid,pgid,comm`).

For some reason pressing ctrl-c inside the VSCode integrated terminal with
fish as the default shell kills the wl-copy process, thus clearing the
clipboard. On other terminals it works fine.

This is also reproducible by running "echo foo | wl-copy" ctrl-v ctrl-c ctrl-v
(the second ctrl-v does not paste because wl-copy was killed).

Work around this for now by running wl-copy asynchronously, and disowning it.
This seems to fix it though I really don't know why. Alternatively we could
"setsid" but that's technically not available on BSD.

For some reason this works in Bash. We should strace it to figure out why.
2024-04-21 14:34:41 +02:00
..
completions Remove stale mention of plus key name 2024-04-20 15:36:29 +02:00
functions Work around ctrl-c in VSCode killing wl-copy and clearing clipboard 2024-04-21 14:34:41 +02:00
groff
tools nim prompt: Don't use test 2024-04-02 17:33:30 +02:00
__fish_build_paths.fish.in
config.fish Reformat share/**.fish with newlines collapsed 2024-02-27 16:25:01 +01:00