Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: foo.bar(:r) doesn't work
- X-seq: zsh-users 1453
- From: Andrew Main <zefram@xxxxxxxxx>
- To: talley@xxxxxxxxxxxxxxxxxxxxxxx (Steve Talley)
- Subject: Re: foo.bar(:r) doesn't work
- Date: Wed, 15 Apr 1998 09:30:40 +0100 (BST)
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <199804142334.RAA01241@xxxxxxxxxxxxxxxxxxxxxx> from "Steve Talley" at Apr 14, 98 05:34:30 pm
Steve Talley wrote:
>In zsh-3.1.2, "echo foo.bar(:r)" prints out "foo", whether foo.bar
>exists or not. In 3.1.2-zefram4, I get the error "zsh: no match" when
>foo.bar doesn't exist.
This form was always documented as working only on the names of existing
files. In prior versions there was special-case code to allow modifiers
to be applied to any string without performing globbing, but in the
glob changes for 3.1.2-zefram4 I simplified things a bit by making this
actually invoke globbing. A side effect is that things like "foo(M)"
now work as expected.
You can get the effect you want -- applying modifiers to an arbitrary
string -- via parameter expansion: "echo ${${:-foo.bar}:r}" has always
been the correct way to do this.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author