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

Re: PATCH: perform expansion for precommand modifiers



Peter Stephenson wrote on Tue, Apr 25, 2017 at 10:15:20 +0100:
> This is something I've been meaning to get around to for a while.
> "exec" and "command" have a for quite a long time now taken options,
> but the parsing hadn't caught up properly so that it wasn't possible to
> put the options, let alone the modifiers themselves, in a parameter.
> This fixes both --- see the new tests.

Is this worth a NEWS entry?  (not README since the change is backwards
compatible)

diff --git a/NEWS b/NEWS
index 5479251..4b5e12a 100644
--- a/NEWS
+++ b/NEWS
@@ -4,5 +4,15 @@ CHANGES FROM PREVIOUS VERSIONS OF ZSH
 
 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 only recognised if they had already been
+present in the command line before any parameter references were expanded.
+Example: 's=command; $s -V ls' now works as expected.
+
+
 Changes from 5.2 to 5.3.1
 -------------------------



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