Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[bug] $SHLVL decremented for the last command of a subshell
- X-seq: zsh-workers 39090
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: [bug] $SHLVL decremented for the last command of a subshell
- Date: Mon, 22 Aug 2016 07:17:23 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=mXHf4wbvIGzKN+cC+dOlkRyDKUAfaXGjmFNjfXA53WA=; b=CUa5nBt0oOqLcptiLqpzHR02aTxrsBtjThNwpiKojrVMjGHsfnHYeIQ6P6iQQk8V0j V4P9fhpapg9JSPtcgTdqy/8fK5dwERaRnv3VmLmDeG7Yhag936ROW8FpOgMdzwdwHGiP f7EM29XBb6iVmhXHRwyG70EBj7AEbveXWV+Bh6VlyX9/EzQZc29uDAHbx81Vf43FrdVi GEDS/siYs2BWUgYVeyRamq/rKynrFYCqaQLYq6n7SM5AErbxEdxSuGPCpzFSIr0V00Jz FFv+IC4FRQrSnTlFglFumOLgDahCGbvDakvrcQuTDoRa/fv2nyFQAnBrcf8hjyQzZpMt YHPg==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
(from https://unix.stackexchange.com/questions/304917/detect-when-zsh-is-running-within-the-subshell-of-another-shell)
$ printenv SHLVL
1
$ (printenv SHLVL)
0
$ (printenv SHLVL;:)
1
$ (:;printenv SHLVL)
0
http://www.zsh.org/mla/workers/1999/msg02472.html
sounds like a potential culprit.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author