Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] bracketed-paste: change quoting style



Bart Schaefer wrote on Thu, Aug 13, 2015 at 09:20:48 -0700:
> On Aug 13,  4:49pm, Oliver Kiddle wrote:
> }
> } I'd agree that it is less ugly but there was some rationale behind the
> } choice of \-quoting. It is easier to remove unwanted characters.
> 
> It's easier to remove the unwanted characters if there isn't very much
> text being pasted or if all the unwanted characters are at the end ...
> but if there are a bunch of backslashes scattered throughout a large
> paste it gets ugly.

Exactly.

> } What I was hoping to get at with the vim-style `[ and `] marks was a way
> } to retrospectively quote the pasted text. Doing things in that order
> } seems more helpful and more flexible.
> 
> Yes, invoking quote-region after the paste allows you to first clean up
> the tail end before adding the quotes, so you get the best of both.

I agree that separating the "paste it" and "quote it" to separate steps
would be good, but it doesn't seem to work in current git: invoking
quote-region quotes the entire command line, not only the pasted part.
Does it depend on an uncommitted patch or something?

If the sequence <bracketed-paste><quote-region> worked, then I'd suggest
to make bracketed-paste not check NUMERIC at all (and never quote the
pasted text), so we could assign NUMERIC a different meaning in the
future, if we wanted to.  (I suppose this echoes Mikael's remarks about
a minimal bracketed-paste-raw.)

Cheers,

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author