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

Re: PATCH: bug in ${(z)...} with newlines



On Wed, 16 Jun 2010 15:13:29 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> On Wed, Jun 16, 2010 at 3:06 PM, Bart Schaefer
> <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > I don't find any use of (z) in _history or indeed anywhere in
> > Completion/**/*(.) [scanning with egrep] that conflicts with your
> > proposed change. ÂI just want to make sure the ramifications have
> > been considered.

Thanks for checking...
 
> BTW there are uses of (z) in Functions/Zle/ that may very well be
> relying on the last ten years of behavior, including in
> match-word-context and match-words-by-style and even which-command.

Several of those are mine, which definitely don't rely on getting something
other than split arguments.  I've been assuming up to now that as long
as the words can be parsed (there are odd cases with unquoted
parentheses and the like) there should be no gotchas, and in particular
that if you've input quoted words separated by white space you should
just get the words back (hence the current thread).

I suspect it would be safest at the least to ensure bufferwords() behaves
the same for calls from ZLE; trying to sanity check that is a whole
different ballgame from looking to see whether shell code has made
assumptions about undocumented behaviour.

-- 
Peter Stephenson <pws@xxxxxxx>            Software Engineer
Tel: +44 (0)1223 692070                   Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom



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