From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id CAA11761 for ; Fri, 7 Jun 1996 02:31:41 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id MAA22584; Thu, 6 Jun 1996 12:24:57 -0400 (EDT) Resent-Date: Thu, 6 Jun 1996 12:24:57 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199606061625.SAA00981@bolyai.cs.elte.hu> Subject: Re: Globbing in redirections To: A.Main@dcs.warwick.ac.uk (Zefram) Date: Thu, 6 Jun 1996 18:25:23 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu (Zsh workers list) In-Reply-To: <6465.199606061454@downwind.dcs.warwick.ac.uk> 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 X-Mailer: ELM [version 2.4ME+ PL16 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"sFuXt2.0.lW5.OPmjn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1278 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > 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