Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: foo(:...) and foo~ glob
- X-seq: zsh-workers 3918
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: schaefer@xxxxxxxxxxxxxxxx (Bart Schaefer)
- Subject: Re: foo(:...) and foo~ glob
- Date: Sat, 2 May 1998 22:22:31 -0500 (CDT)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <980502152731.ZM28509@xxxxxxxxxxxxxxxxxxxxxxx> from Bart Schaefer at "May 2, 98 03:27:31 pm"
> On May 2, 3:27pm, Zoltan Hidvegi wrote:
> } Subject: foo(:...) and foo~ glob
> }
> } After this change:
> }
> } Sun Apr 5 20:00:40 1998 Andrew Main <zefram@xxxxxxxx>
> }
> } the (:quals) syntax no longer works.
>
> Does this also mean that either/both of the following are broken?
>
> echo ${pref}**/CVS(:h) | sed 's/CVS//'
>
> case $(tty)(:t) in
Perhaps I was not very clear. Both of these works. The (:...) syntax
triggers globbing, which means it does not work on words which are not
existing filenames. The later $(tty)(:t) example works differently than
before, although you'll not notice it: zsh now looks at the disk if the
result of tty exists before applying the qualifier, while before the
qualifier was applied unconditionally. Since ttyp gives you an existing
device, this does not make any difference here. The difference is in
things like
echo asdfg(:s/g/h/)
gives you
zsh: no matches found: asdfg(:s/g/h/)
instead of asdfh if you do not have a file called asdfg in your current
directory. Zefram is right in that the old behaviour was not very well
documented, which is really my fault, since I added this in 2.6-beta20.
Zoli
Messages sorted by:
Reverse Date,
Date,
Thread,
Author