From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2090 invoked from network); 8 Feb 2000 18:08:04 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 8 Feb 2000 18:08:04 -0000 Received: (qmail 9079 invoked by alias); 8 Feb 2000 18:07:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9624 Received: (qmail 9071 invoked from network); 8 Feb 2000 18:07:51 -0000 From: "Bart Schaefer" Message-Id: <1000208180700.ZM31285@candle.brasslantern.com> Date: Tue, 8 Feb 2000 18:07:00 +0000 In-Reply-To: Comments: In reply to Alexandre Duret-Lutz "*suggestion* for NULLCMD and emulate [ck]sh" (Feb 8, 11:54am) References: X-Mailer: Z-Mail (5.0.0 30July97) To: Alexandre Duret-Lutz , zsh-workers@math.gatech.edu Subject: Re: *suggestion* for NULLCMD and emulate [ck]sh MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Feb 8, 11:54am, Alexandre Duret-Lutz wrote: } Subject: *suggestion* for NULLCMD and emulate [ck]sh } } When doing redirections with no file, shells can show three behaviours: } } > file } } is equivalent to } } [k]sh) : > file } csh) forbiden } zsh) $NULLCMD > file } } Zsh can emulate the to first by setting NULLCMD to ':' or unsetting NULLCMD. } } What I would like zsh do is [let the user choose any of the three]. } } I thought this could be accomplished by adding two options to zsh, } one would tell wether the NULLCMD parameter should be considered } or not by the exec.c code, and the other could say what the } default behaviour (sh or csh) when NULLCMD is unset. I think something along these lines might be OK, but that the semantics and names that you chose are not quite right. Rather than have zsh change the value of NULLCMD when it starts up as sh or ksh, the proposed SH_NULLCMD option should cause the ": > file" style to be used regardless of the value of NULLCMD. The second option, which I'd call CSH_NULLCMD for consistency, would also ignore the value of NULLCMD but give the "redirection with no command" error. We then pick one of these to "win" when both are set, as presently happens with e.g. NULLGLOB and CSH_NULLGLOB. I don't really care which one wins. Do we need something similar for READNULLCMD? Can these same two options be overloaded for both at once? If the answers are "yes" and "no" then I think the right thing is to not change it at all, as it's just too sloppy to get it right. If the first is "no" or the second is "yes," go ahead. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com