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

Re: destructive list-expand

On May 15,  4:18pm, Sven Wischnowsky wrote:
} Subject: Re: destructive list-expand
} Peter Stephenson wrote:
} > Sven wrote:
} > > The patch makes it keep all quotes *inside* parameter expansions when
} > > *not* completing a parameter name.  For the simple things I tried, this
} > > worked.  And for the case we were discussing, this gives the right
} > > string to the shell code.

This now gives the right thing for me with list-expand, but still fails
on _list_expansions (or _expand_word).  The command line isn't de-quoted
in either case, but _expand_word still just feeps at me.

schaefer<506> echo ${(M)${(f)"$(<=(print -l *))"}:#*conf*}<TAB>
No matches for `file' or `corrections'
schaefer<506> echo ${(M)${(f)"$(<=(print -l *))"}:#*conf*}<C-x g>
acconfig.h    config.h.in   config.sub    configure.in  
config.guess  config.log    configure     

Then there's this problem -- move the quotes outside the parameter:

schaefer<507> echo "${(M)${(f)$(<=(print -l *))}:#*conf*}"<C-x g>
[expansion elided]
schaefer<507> echo ${(M)${(f)$(<=(print -l *))}:#*conf*}"

Now the leading quote has been removed, but the trailing quote is there.
(They used to both disappear.)

} > Are we sure the zle_tricky.c change doesn't cause some knock-on problem,
} > e.g. in old-style completion? 

Obviously we're not.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   

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