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

Re: PATCH: perform expansion for precommand modifiers

Peter Stephenson wrote on Fri, Apr 28, 2017 at 10:03:38 +0100:
> Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> > On Apr 27,  9:40am, Peter Stephenson wrote:
> > This isn't testing the right thing.  The complaint was that the -c option
> > of exec was treated as a command name if the keyword was quoted.
> I think we can fix this by adding a test for that.
> > Similarly for "command -p" which now that I try it is still broken:
> > 
> > torch% \command -p echo
> > zsh: command not found: -p
> That's nothing to do with the quoting.  I assumed we had a test for -p
> without -v or -V, but apparently we don't, so I didn't notice there was
> an extra node to remove.

Updated docs, replaced 41013.

diff --git a/NEWS b/NEWS
index 5479251..568b160 100644
--- a/NEWS
+++ b/NEWS
 Note also the list of incompatibilities in the README file.
+Changes from 5.3.1 to 5.4
+The 'exec' and 'command' precommand modifiers, and options to them, are
+now parsed after parameter expansion.  Previously, both the modifier and
+any options to it were parsed between alias expansion and parameter
+expansion (see zshexpn(1)), so they could neither be quoted nor be the
+result of parameter expansion.  Examples: 's=command; $s -V ls' and
+'\command -V ls' now work as expected.
 Changes from 5.2 to 5.3.1

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