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

Cannot redirect wl-paste to .sh file. #236

Open
Rodrigodd opened this issue Oct 2, 2024 · 1 comment
Open

Cannot redirect wl-paste to .sh file. #236

Rodrigodd opened this issue Oct 2, 2024 · 1 comment

Comments

@Rodrigodd
Copy link

Reproduction

  1. Copy any plain text, like the shell code below:
echo "hello $1"
  1. And run
wl-paste > hello.sh

What happens

The command returns:

Clipboard content is not available as inferred output type "application/x-sh"
Use "wl-paste --list-types" to view available types. Use "--type" to explicitly specify a type.

Expected behavious

It just works, by fallbacking from application/x-sh to txt/plain, or by never inferring application/x-sh in the first case (I not aware of the use case of this mime type).

Workaround

wl-paste | cat > hello.sh

See also

I also saw this post referring to the same problem: https://www.reddit.com/r/linux4noobs/comments/1azwfjj/how_does_shell_outputinput_redirect_work_it_seems/

@bugaevc
Copy link
Owner

bugaevc commented Oct 3, 2024

Hi!

wl-paste | cat > hello.sh

rather, try: wl-paste --type text > hello.sh

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

No branches or pull requests

2 participants