blob: aa2dcb1affaff4bf073750eb2ac91822c8e8456f (
plain)
1
2
3
4
5
|
#!/bin/bash
# Remove linebreaks and indentation in clipboard content. This makes the content safe to paste in e.g. a chat window
xclip -o | perl -pe 'BEGIN{undef $/;} s#\h*\n\h*# #mg; s#^\s*##; s#\s*$##' | xclip
|