Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Globbing in redirections
- X-seq: zsh-workers 1278
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: A.Main@xxxxxxxxxxxxxxxxx (Zefram)
- Subject: Re: Globbing in redirections
- Date: Thu, 6 Jun 1996 18:25:23 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx (Zsh workers list)
- In-reply-to: <6465.199606061454@xxxxxxxxxxxxxxxxxxxxxxxxxx> from Zefram at "Jun 6, 96 03:54:30 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> This patch makes redirection behave a little more like ksh.
> It disables globbing on filenames in redirections, but only when
> multios are disabled. (Globbed redirections are a very useful way
> to generate multios.) Note that behaviour is still not exactly
> like ksh, as brace expansion is still done. But ksh seems to treat
> brace expansion as part of globbing: compare "echo ~{root,nobody}"
> in the two shells. (KSH_BRACES, anyone?)
No, that's a different problem. In zsh filename expansion is performed
after most other substitutions while POSIX says that it must be the first
expansion which must be done before $ susbstitutions. In zsh I can use
USER=hzoli ; echo ~$USER
but this does not work in a POSIX compilant shell. I'll move filename
expansion before the other substitutions if zsh is invoked as sh/ksh. Or
maybe an option should control this? I personally think that the best
would be to do filename expansions first even if zsh is invoked as zsh but
I'm sure that it will break some scripts. Does anyone have such a script?
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author