Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close stderr before forking wl-copy #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomKPZ
Copy link

@tomKPZ tomKPZ commented Jan 3, 2023

The default mode of the kitty terminal is to wait until output from all subprocesses is finished before closing. This means running wl-copy asdf; exit will exit the shell but cause kitty to hang as it waits for wl-copy to output. This change closes stderr to prevent this issue.

The default mode of the kitty terminal is to wait until output
from all subprocesses is finished before closing.  This means
running `wl-copy asdf; exit` will exit the shell but cause
kitty to hang as it waits for wl-copy to output.  This change
closes stderr to prevent this issue.
@bugaevc
Copy link
Owner

bugaevc commented Jan 3, 2023

Hi!

This has been proposed before (see #110), and I'm still not convinced this is a good idea.

@kovidgoyal
Copy link

Use

echo asdf | kitty +kitten clipboard

instead, when running inside kitty. There is no need to use WM specific tools for copying to clipboard.

@lilydjwg
Copy link

lilydjwg commented Jan 21, 2024

Not closing stderr will leave a ssh command having called wl-copy to hang there until something else has copied.

Also, doing a 2>/dev/null redirection is awkward because it has to be quoted on the ssh command line, which prevents code highlight and shell-word movements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants