* Is ${} supported?
@ 1996-11-27 9:20 Anthony Heading
1996-11-27 23:20 ` Zoltan Hidvegi
0 siblings, 1 reply; 4+ messages in thread
From: Anthony Heading @ 1996-11-27 9:20 UTC (permalink / raw)
To: zsh-workers
The "null" parameter seems useful to allow the following sort of thing:
% echo ${(j/+/):-{one,two,three}}
one+two+three
But does it only work by accident, or can it be relied on? Should
it be documented?
Anthony
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is ${} supported?
1996-11-27 9:20 Is ${} supported? Anthony Heading
@ 1996-11-27 23:20 ` Zoltan Hidvegi
1996-11-28 9:45 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Zoltan Hidvegi @ 1996-11-27 23:20 UTC (permalink / raw)
To: Anthony Heading; +Cc: zsh-workers
> The "null" parameter seems useful to allow the following sort of thing:
>
> % echo ${(j/+/):-{one,two,three}}
> one+two+three
>
> But does it only work by accident, or can it be relied on? Should
> it be documented?
It can be relied on. I suspect that I have several scripts relying on
that. It should be documented of course.
Zoltan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is ${} supported?
1996-11-27 23:20 ` Zoltan Hidvegi
@ 1996-11-28 9:45 ` Peter Stephenson
1996-11-28 14:38 ` Zoltan Hidvegi
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 1996-11-28 9:45 UTC (permalink / raw)
To: Zsh hackers list
Zoltan Hidvegi wrote:
> > The "null" parameter seems useful to allow the following sort of thing:
> >
> > % echo ${(j/+/):-{one,two,three}}
> > one+two+three
>
> It can be relied on.
Just as a matter of interest, why does the following not work the same
way?
% print ${(j/,/):-/proc/*(U:t)}
23020 23048 23051 23052 23062 26604
--
Peter Stephenson <pws@ifh.de> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77413
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is ${} supported?
1996-11-28 9:45 ` Peter Stephenson
@ 1996-11-28 14:38 ` Zoltan Hidvegi
0 siblings, 0 replies; 4+ messages in thread
From: Zoltan Hidvegi @ 1996-11-28 14:38 UTC (permalink / raw)
To: Peter Stephenson; +Cc: zsh-workers
Peter Stephenson wrote:
> Just as a matter of interest, why does the following not work the same
> way?
>
> % print ${(j/,/):-/proc/*(U:t)}
> 23020 23048 23051 23052 23062 26604
Because globbing performed much later than expansion. The order is
precisely described in zshexpn.man.
Zoltan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1996-11-28 14:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-11-27 9:20 Is ${} supported? Anthony Heading
1996-11-27 23:20 ` Zoltan Hidvegi
1996-11-28 9:45 ` Peter Stephenson
1996-11-28 14:38 ` Zoltan Hidvegi
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).