From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4201 invoked from network); 19 Sep 2006 16:57:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.5 (2006-08-29) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Sep 2006 16:57:45 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 53296 invoked from network); 19 Sep 2006 16:57:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Sep 2006 16:57:37 -0000 Received: (qmail 29408 invoked by alias); 19 Sep 2006 16:57:24 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22743 Received: (qmail 29350 invoked from network); 19 Sep 2006 16:57:23 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 Sep 2006 16:57:23 -0000 Received: (qmail 50714 invoked from network); 19 Sep 2006 16:57:23 -0000 Received: from cluster-d.mailcontrol.com (217.69.20.190) by a.mx.sunsite.dk with SMTP; 19 Sep 2006 16:57:22 -0000 Received: from cameurexb01.EUROPE.ROOT.PRI ([62.189.241.200]) by rly24d.srv.mailcontrol.com (MailControl) with ESMTP id k8JGp7BT028929 for ; Tue, 19 Sep 2006 17:57:10 +0100 Received: from news01.csr.com ([10.103.143.38]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.1830); Tue, 19 Sep 2006 17:54:08 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.13.7/8.13.4) with ESMTP id k8JGs9rY002643 for ; Tue, 19 Sep 2006 17:54:09 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.13.7/8.13.7/Submit) with ESMTP id k8JGs8Jd002640 for ; Tue, 19 Sep 2006 17:54:08 +0100 Message-Id: <200609191654.k8JGs8Jd002640@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: set - $foo resets set -x In-reply-to: <200609192023.06736.arvidjaar@newmail.ru> References: <200609192023.06736.arvidjaar@newmail.ru> Date: Tue, 19 Sep 2006 17:54:08 +0100 From: Peter Stephenson X-OriginalArrivalTime: 19 Sep 2006 16:54:08.0981 (UTC) FILETIME=[398BA850:01C6DC0C] Content-Type: text/plain MIME-Version: 1.0 X-Scanned-By: MailControl A-07-04-01 (www.mailcontrol.com) on 10.68.0.134 Andrey Borzenkov wrote: > /* Obsolescent sh compatibility: set - is the same as set +xv * > * and set - args is the same as set +xv -- args */ > if (*args && **args == '-' && !args[0][1]) { > dosetopt(VERBOSE, 0, 0); > dosetopt(XTRACE, 0, 0); > if (!args[1]) > return 0; > } > > Anyone remembers the reasons for that? May be we can at least relax it if > running in emulate zsh mode? I'm inclined to agree, since zsh's native emulation tends to remove the worst idiocies from prehistory, and currently it doesn't even seem to be documented... Index: Doc/Zsh/builtins.yo =================================================================== RCS file: /cvsroot/zsh/zsh/Doc/Zsh/builtins.yo,v retrieving revision 1.86 diff -u -r1.86 builtins.yo --- Doc/Zsh/builtins.yo 24 Jul 2006 22:00:20 -0000 1.86 +++ Doc/Zsh/builtins.yo 19 Sep 2006 16:51:40 -0000 @@ -1160,6 +1160,10 @@ If no arguments and no `tt(-)tt(-)' are given, then the names and values of all parameters are printed on the standard output. If the only argument is `tt(PLUS())', the names of all parameters are printed. + +For historical reasons, `tt(set -)' is treated as `tt(set +xv)' +and `tt(set -) var(args)' as `tt(set +xv --) var(args)' when in +any other emulation mode than zsh's native mode. ) module(setcap)(zsh/cap) findex(setopt) Index: Src/builtin.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/builtin.c,v retrieving revision 1.162 diff -u -r1.162 builtin.c --- Src/builtin.c 10 Sep 2006 19:11:54 -0000 1.162 +++ Src/builtin.c 19 Sep 2006 16:51:41 -0000 @@ -535,7 +535,7 @@ /* Obsolescent sh compatibility: set - is the same as set +xv * * and set - args is the same as set +xv -- args */ - if (*args && **args == '-' && !args[0][1]) { + if (emulation != EMULATE_ZSH && *args && **args == '-' && !args[0][1]) { dosetopt(VERBOSE, 0, 0); dosetopt(XTRACE, 0, 0); if (!args[1]) -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070 To access the latest news from CSR copy this link into a web browser: http://www.csr.com/email_sig.php