Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: is text file?
- X-seq: zsh-workers 3535
- From: Peter Stephenson <pws@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: is text file?
- Date: Mon, 29 Sep 1997 12:25:21 +0200
- In-reply-to: ""Bart Schaefer""'s message of "Sun, 28 Sep 1997 17:06:07 MET." <970928170607.ZM7789@xxxxxxxxxxxxxxxxxxxxxxx>
"Bart Schaefer" wrote:
> % ls **/*~*(${~${(j/|/)fignore}})(.)
>
> (Somebody tell me why the extra ${~...} is needed in that expression.)
The `|' needs to be tokenised. Otherwise, it looks for the pattern
'.o|~|.pro|.dvi' or whatever as a literal file name. Since the string
required by j is just that, a string not a pattern, it is untokenised
when used to join the array.
Or do you mean, why can't I put the ~ in the same ${...}, in which case,
at least in 3.0.5 and 3.1.2, I think you can.
% echo *(${(j/|/)~fignore})
Makefile~ builtin.c~ builtin.o ...
I think Zoltan has recently updated the substitution code, though.
(Or did you mean, why doesn't it go between the { and the (, in which
case the answer is `it just doesn't, but maybe it should say so in
the manual'.)
--
Peter Stephenson <pws@xxxxxx> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413
Deutsches Elektronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, Platanenallee 6, 15738 Zeuthen, Germany.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author