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

Re: bracketed paste



On Nov 18,  8:57pm, Yuri D'Elia wrote:
} Subject: bracketed paste
}
} https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787628
} 
} This made me think what I've written before in the bug report: what if
} the terminal just encodes into base64 the block to be pasted?

This would at the least require a different set of start/end sequences.
(Not necessarily the ones sent from the app to the terminal to initiate
and end the mode, but the ones sent by the terminal to indicate when a
paste is happening.)  Whether you can find usages in the wild or not,
the current pair of escapes already has different semantics.

But I can't really muster enthusiasm for this idea.  It means that an
app that doesn't want to play the game can't simply throw away the
escapes and still receive sensible pasted content.  The consequences
if the mode is unintentionally activated (or remains activated, as was
happening with vim invoked from our edit-command-line widget) are at
least as unpleasant for the app and arguably worse for the user.

And it means building a base64 decoder into everything.  Yuck.

In the vast majority of cases the only problematic characters that
appear in a paste are line breaks.  Having bracketed-paste activated
by default in zsh seems only to be causing more issues than it solved.  
Having an extra keystroke to turn it on (and then automatically turn
off when the "closing bracket" is seen) might have been a better plan.



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