Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: <> redirection operator (was: zsh.texi)
- X-seq: zsh-workers 1358
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: A.Main@xxxxxxxxxxxxxxxxx (Zefram)
- Subject: Re: <> redirection operator (was: zsh.texi)
- Date: Mon, 17 Jun 1996 15:10:29 +0200 (MET DST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <12801.199606161323@xxxxxxxxxxxxxxxxxxxxxxx> from Zefram at "Jun 16, 96 02:23:14 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
> >I agree with that but I'm afraid that this change will break many scripts.
> >But it would be definitely simpler and cleaner, and the documentation would
> >be much simpler and less confusing.
>
> How often do you use numerical globbing? I've only ever used it
> interactively. It wouldn't be the first time we've changed behaviour,
> and the change required to scripts is trivial.
I decided: in beta21, <> will always do redirection.
> And regarding the &> redirection you mentioned: I think this is a bad
> idea. It's not POSIX conformant (consider `a &> b c`), and it's not
Yes, a &> b c will work differently from what POSIX requires but a & > b c
will be OK. I do not think that there is any script which contains
adjacent & and >.
> really necessary. It is possible to redirect to a file called "-" by
> doing `>& ./-`.
The biggest problem is when you use parameter expansion. When you write
>& $foo you cannot tell in advance wether the output will be closed or if
it goes to a file, or to an other file descriptor or to the coprocess.
Implementing &> is very simple and I do not think that it conflicts with
any scripts (and a portable script which expects POSIX behaviour should not
use &> anyway since bash uses it for redirectiog standard output and
error which means that such a script will not work under Linux).
Zoltan
Messages sorted by:
Reverse Date,
Date,
Thread,
Author