chiark / gitweb /
bin/un-backslashify-selection: Fix for newer `pterm'.
authorMark Wooding <mdw@distorted.org.uk>
Wed, 29 Nov 2017 14:42:41 +0000 (14:42 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 29 Nov 2017 14:42:41 +0000 (14:42 +0000)
It seems that `pterm' is trying to be more intelligent about newline
handling.  The result is that when you select a number of lines in an
Emacs ERC buffer, sometimes the final `\' of a line isn't actually
followed by a newline.

Tweak the seddery to cope with this.  In particular, zap spaces
following a `\' along with the `\' itself.

bin/un-backslashify-selection

index 1b14d43a7348da217be9ca6e41d9e7d330d44349..ad4e1fa4a8f30e65437938bfd3a4e71f5797c1d3 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 
 xsel -o | sed '
-       s:\\::g
+       s:\\ *::g
        H
 $      !d