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 CAA12002 for ; Fri, 7 Jun 1996 02:44:50 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id MAA23159; Thu, 6 Jun 1996 12:37:06 -0400 (EDT) Resent-Date: Thu, 6 Jun 1996 12:37:06 -0400 (EDT) From: Zefram Message-Id: <27406.199606061636@granite.dcs.warwick.ac.uk> Subject: Re: Globbing in redirections To: hzoli@cs.elte.hu (Zoltan Hidvegi) Date: Thu, 6 Jun 1996 17:36:37 +0100 (BST) Cc: A.Main@dcs.warwick.ac.uk, zsh-workers@math.gatech.edu In-Reply-To: <199606061625.SAA00981@bolyai.cs.elte.hu> from "Zoltan Hidvegi" at Jun 6, 96 06:25:23 pm X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]7618.46 X-US-Congress: Moronic fuckers MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"mBiGC2.0.nf5.namjn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1279 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >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? I don't actually have a script that does this, but it's very nice behaviour, and I do use it from time to time. I think we should have another option for this, which would have options OPT_EMULATE|OPT_BOURNE. Note that zsh actually follows csh behaviour, so this really should be OPT_BOURNE and not OPT_NONZSH. (If you've never heard of these options, you'll need to check the patch in article 1275.) However, my original point stands. ksh doesn't do brace expansion in redirections. We need to split up prefork() somewhere -- is there another function that would be more appropriate to use in this case? We need all expansions except for brace expansion and globbing, but prefork() does everything except globbing. -zefram