From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20338 invoked by alias); 1 Sep 2016 04:25:45 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39148 Received: (qmail 29630 invoked from network); 1 Sep 2016 04:25:45 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm0-f52.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(74.125.82.52):SA:0(0.0/5.0):. Processed in 0.293998 secs); 01 Sep 2016 04:25:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: stephane.chazelas@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 74.125.82.52 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jpPBJ+d7El/1SrmrXDCPBkSLyJwl+s/VTxR/boue/zg=; b=FAcKDTtmoY7+SkIjzcRnmJfacHAthw7bByG6USuV2lDwT0PgJKg9fCKdb+YNuqX6rW krWB2YYMd1PsYYLCneYMGA5l8qPXKijRoTDJJUDoiPv/EH/0GneKnPoZQRWN375iDN5U pTG4ATDkqDBKrbUAb+UXGtURAy6+Uypjutr+uHGRy2kjSsP/O3mQMjZVm8FAyQpoiKU2 rM/E0o2OjWNVNlnFiOUWtay0xs/hMMFIcY0pqahjz7G8FH38043WpeS6Q3Nwyu4QhWLU NPlVenidranHWYIfZg+wJ4PnnuouqbyyqfNGseQJ4pgxwuJjfjPz544C4SzSE32+Bko3 vURQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=jpPBJ+d7El/1SrmrXDCPBkSLyJwl+s/VTxR/boue/zg=; b=HZT5OAkawW1Ad3uRT3cn8o8lQRwyXmcwDly6qar0VYY9dIrvmeDrKntriak7Fwq9w8 LrTQiWnc7Vq7tCgjkIBuQBxG9ZfnMcAKeUA5u0cYrdeDFV++JW3ZfR3NGW7/4f+dKktZ h7vRhoFlICWPLwtNN1hja++5WVwMsHBvnf+1z+5VJ74/q199EMUyrndkuKgl32VdZapy KmeegrUM9pW5pKME3pFRZWtgqaJGa2G/Vgxrg98axQ0MRW60fki2rJ7d29YlSa/Ir/4g B2J+5MPx6vrfauc7aUwulvjPuvWrwoNZxIAzDVJO/uzRd0jIOfk4WsqS/j/ariZLvONZ rNog== X-Gm-Message-State: AE9vXwPmOm8HLLH3gNNzx7+UpQRyMCafWsjOa07hmc/UrBsU4Dzx6q8uMz+GylFd+/Myyg== X-Received: by 10.194.23.39 with SMTP id j7mr5034900wjf.4.1472586871534; Tue, 30 Aug 2016 12:54:31 -0700 (PDT) Date: Tue, 30 Aug 2016 20:54:29 +0100 From: Stephane Chazelas To: Peter Stephenson Cc: Zsh hackers list Subject: Re: [PATCHv2] [bug] $SHLVL decremented for the last command of a subshell Message-ID: <20160830195429.GB50437@chaz.gmail.com> Mail-Followup-To: Peter Stephenson , Zsh hackers list References: <20160822061723.GA7308@chaz.gmail.com> <20160829155156.GB17700@chaz.gmail.com> <160829185505.ZM8699@torch.brasslantern.com> <20160830124426.GA15615@chaz.gmail.com> <20160830140457.74d9d32d@pwslap01u.europe.root.pri> <20160830164601.GA50437@chaz.gmail.com> <20160830180032.199eae0a@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160830180032.199eae0a@pwslap01u.europe.root.pri> User-Agent: Mutt/1.5.21 (2010-09-15) 2016-08-30 18:00:32 +0100, Peter Stephenson: [...] > When this was introduced in zsh, there was some controversy over whether > it was the right thing to do. I decided it was on the basis that the > "level" is how deep you are in the process hierarchy, rather than how > many processes have previously been executed to get where you are, > seeing as the latter isn't really visible in the current context. > But I'm not aware of any requirement specification [remember those?] > saying what the purpose of SHLVL is. [...] Yes, it's not POSIX. It was probably either a tcsh or bash invention as both had it in 1990 and ksh88 didn't and still doesn't have it. And zsh behaves like tcsh and bash here (in that SHLVL is decreased in zsh -c 'exec cmd'). -- Stephane