summaryrefslogtreecommitdiffstats
path: root/clipboard-singlify
diff options
context:
space:
mode:
Diffstat (limited to 'clipboard-singlify')
-rwxr-xr-xclipboard-singlify4
1 files changed, 3 insertions, 1 deletions
diff --git a/clipboard-singlify b/clipboard-singlify
index 75d09e0..aa2dcb1 100755
--- a/clipboard-singlify
+++ b/clipboard-singlify
@@ -1,3 +1,5 @@
#!/bin/bash
-xclip -o | perl -pe 'BEGIN{undef $/;} s#[\t ]*\n[\t ]*# #mg; s#^\s*##; s#\s*$##' | xclip
+# 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