wl-clipboard
wl-clipboard copied to clipboard
Cannot redirect `wl-paste` to `.sh` file.
Reproduction
- Copy any plain text, like the shell code below:
echo "hello $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/
Hi!
wl-paste | cat > hello.sh
rather, try: wl-paste --type text > hello.sh