Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Parameter expansion flag (%) priority.
- X-seq: zsh-users 11782
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh users <zsh-users@xxxxxxxxxx>
- Subject: Parameter expansion flag (%) priority.
- Date: Mon, 20 Aug 2007 17:13:08 +0200
- Mail-followup-to: zsh users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
[snip]
zsh% print ${(%):-%n}
hawk
zsh% print ${(U%):-%n}
zsh
zsh% print ${(%):-%N}
zsh
[snap]
However, the docs say:
[snip]
U Convert all letters in the result to upper case.
[snap]
The 'letters in the result' led me to the assumption, that (U) would
be applied *after* prompt expansion is done be (%).
(Same applies to (L).)
Am I misunderstanding the docs (no native English speaker here), or am
I overlooking something? If not, should the docs be clarified?
(Background is, that someone on IRC asked for a way to lowercase the
'%m' replace in the his PS1. Our proposal of %{(%L):-%n} turned out
to be broken.)
Regards, Frank
--
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by:
Reverse Date,
Date,
Thread,
Author