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) with ESMTP id EAA04751 for ; Fri, 31 May 1996 04:17:54 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA26910; Thu, 30 May 1996 14:00:46 -0400 (EDT) Resent-Date: Thu, 30 May 1996 14:00:46 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199605301800.UAA31169@bolyai.cs.elte.hu> Subject: Re: execcmd() reordering To: pws@ifh.de (Peter Stephenson) Date: Thu, 30 May 1996 20:00:50 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <199605301658.SAA21722@hydra.ifh.de> from Peter Stephenson at "May 30, 96 06:58:29 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: <"ibApH1.0.La6.E9Uhn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1230 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > 1) exec, noglob, - and command are treated more like commands; they can > appear from substitution, though not globbing (which would be stupid). Yes stupid, but that's how other shells behave. But since noglob must be detected before globlist() that's the best we can do. > 6) globbing is expanded before the fork. Other than getting the > prompt back an iota later when running background commands, I don't > see this is a big deal. One thing which seems to be a plus is that > failures to match are now handled synchronously for background > commands: Also it makes debugging much easier. Now prefork is really a historic name. There used to be prefork and postfork and a lot of substitutions had been done in the later. > 8) fixcline() got moved up. This means things in the command line which > expand to nothing are removed (if completely blank), or untokenised > (if something like '') earlier. The only consequent changes are that > for AUTOCD the word mustn't be completely blank, since > otherwise "$nonexistent" would have caused cd to home, which is a > little counterintuitive. Also, `[' doesn't need specially > untokenising any more --- this must be a sign we're Doing the Right Thing. Also makecline can be simplified after that patch. > (iv) The new tests for `command', `exec', etc., are just simple > strcmp's. It really didn't seem worth doing anything fancy > for four short strings. I was thinking about adding these into builtintab with some new BINF_ flags: e.g. all of these would have BINF_PREFIX and there would be one more BINF_ flag for each. This would improve sh compatibility. Hopefully a hash-table lookup is not slower than these strcmps. If something is found with BINF_PREFIX shfunctab may be searched which may override builtintab similarily to ksh. Zoltan