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 SAA21814 for ; Mon, 1 Jul 1996 18:39:51 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA02993; Mon, 1 Jul 1996 04:23:08 -0400 (EDT) Resent-Date: Mon, 1 Jul 1996 04:23:08 -0400 (EDT) Message-Id: <199607010822.KAA28291@hydra.ifh.de> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: Bug in zsh-2.6-beta21 In-reply-to: "alainc@nortel.ca"'s message of "Fri, 21 Jun 1996 10:29:00 MET." <"11312 Fri Jun 21 10:55:10 1996"@bnr.ca> Date: Mon, 01 Jul 1996 10:22:22 +0200 From: Peter Stephenson Resent-Message-ID: <"XoTuk.0.hk.hhurn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1493 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu alainc@nortel.ca wrote: > I found the following bug in zsh-2.6-beta20 and beta21: > > I typed in the following: > > exec <3 <(ls -l) > > ---> zsh: no such file or directory: 3 > > So far so good, but after that it seems that zle is broken as the up > arrow does not retrieve the last command entered. Instead, the cursor > just goes up. The tab character does not perform completion anymore, > it just inserts a TAB. This was on a xterm window. Zsh thinks the <(ls -l) is a real argument, which is not unreasonable, so it thinks it's doing a real exec. However, the <3 open fails and it decides it not going to do a real exec after all and returns from execcmd(). The problem is that by that time entersubsh() has been called to set zsh up for becoming an external program, so at the error return lots of things (zle, monitor, job tables) are set up wrongly. What's the answer? 1) Do we delay entersubsh() until after the redirections are handled? I don't see why that shouldn't work. It might fix similar potential problems with globlist. (Remember, it doesn't affect whether the shell *really* becomes a subshell, just the settings.) 2) Or should this entersubsh() be delayed for safety until immediately before the external command is executed? 2) Or is the answer to alter the behaviour of the third argument to entersubsh (the `fake' flag) so that even less happens on an exec? (I believe it needs to be called in this case really just to set up the terminal for an external command and internal settings are irrelevant --- but in this particular case we shouldn't really be setting anything.) By the way, I know you're not interested, but to me `depreciate' has only ever meant `decrease in [usually monetary] value', whatever the dictionary says. I've never in my life heard it used transitively --- wrong side of the Atlantic, perhaps. -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.