Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
The (X) flag.
- X-seq: zsh-users 10450
- From: Frank Terbeck <frank.terbeck@xxxxxxxxxxxxxx>
- To: zsh users <zsh-users@xxxxxxxxxx>
- Subject: The (X) flag.
- Date: Wed, 28 Jun 2006 06:57:52 +0200
- Mail-followup-to: zsh users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Operating-system: Linux 2.6.16.16 i686
Hi List.
Quoting the manual:
[snip]
X With this flag parsing errors occurring with the Q and e flags
or the pattern matching forms such as `${name#pattern}' are
reported. Without the flag they are silently ignored.
[snap]
Now I thought it might throw an error when a given pattern doesn't
match:
[snip]
zsh% foo='Hello World, mere mortal!'
zsh% print ${foo#*, }
mere mortal!
zsh% print ${foo#*. }
Hello World, mere mortal!
zsh% print ${(X)foo#*. }
Hello World, mere mortal!
[snap]
I would have expected an error for the last command.
However, I guess, I'm misunderstanding the manual. So, could someone
please give an example of what this flag does?
Regards, Frank
Messages sorted by:
Reverse Date,
Date,
Thread,
Author