Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Parameter Expansion
- X-seq: zsh-users 30313
- From: Lawrence Velázquez <larryv@xxxxxxx>
- To: "Mark J. Reed" <markjreed@xxxxxxxxx>, "Vin Shelton" <ethersoft@xxxxxxxxx>
- Cc: zsh-users@xxxxxxx
- Subject: Re: Parameter Expansion
- Date: Tue, 15 Jul 2025 16:06:24 -0400
- Archived-at: <https://zsh.org/users/30313>
- Feedback-id: iaa214773:Fastmail
- In-reply-to: <CAA=-s3ye-Kjh8UXrUY1hpX5_=_MWM0GJdCSEdwCMJjd9o9OQ7Q@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CACeGjnWw4=9Hm9k0iXSoLDRYCfVxEz=uYrQ6MyBouRbFBbf7yw@mail.gmail.com> <44d1a0ff-b701-459c-aeb4-6b71e7c6cd62@gmx.com> <CACeGjnULdr+zyC=rmp8JbV-ouPgfJMGKSfQk1nYS=OrJ+xPQPA@mail.gmail.com> <CAA=-s3xT_v+hXkfAteLfvnL38JSsGo=d5dh0QZJrt1BmaDvJ_Q@mail.gmail.com> <CACeGjnWu0an+k9OhtP-694YOroOGhLU=hCn4j5n9NyqA5AM5Ew@mail.gmail.com> <CAA=-s3ye-Kjh8UXrUY1hpX5_=_MWM0GJdCSEdwCMJjd9o9OQ7Q@mail.gmail.com>
On Tue, Jul 15, 2025, at 2:17 PM, Mark J. Reed wrote:
> I'm not denying that the doc could be clearer - there should probably
> be a note in PARAMETER EXPANSION mentioning that history expansion
> modifiers can be used
There already is one:
In addition to the following operations, the colon modifiers
described in noderef(Modifiers) in noderef(History Expansion)
can be applied: for example, tt(${i:s/foo/bar/}) performs
string substitution on the expansion of parameter tt($i).
https://sourceforge.net/p/zsh/code/ci/zsh-5.9.0.2-test/tree/Doc/Zsh/expn.yo
--
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author