zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane@chazelas.org>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: $SHLVL origin (was: $PPID not updated when the PPID changes (parent killed))
Date: Tue, 18 May 2021 19:50:39 +0100	[thread overview]
Message-ID: <20210518185039.7zo76vofxrn6qqqd@chazelas.org> (raw)
In-Reply-To: <CAH+w=7YR5OagGbTWT1fuQfDJvrZBekBgZUQKh6kfWe1TtW-aQQ@mail.gmail.com>

2021-05-18 11:12:54 -0700, Bart Schaefer:
> On Tue, May 18, 2021 at 11:06 AM Stephane Chazelas
> <stephane@chazelas.org> wrote:
> >
> > $SHLVL (a (t)csh thing IIRC, not handled by all shells)
> 
> Bash has it, for sure.
[...]

I remember looking up the origin of it when we were discussing
https://www.zsh.org/mla/workers/2016/msg01574.html

It does come from tcsh in the early 80s (see
https://groups.google.com/forum/message/raw?msg=net.sources/3eER9GEdo2c/B9G1KGziIx4J
for instance).

Also supported by bash, ksh93, fish, zsh and yash (implement in
startup file as shell code only for interactive instances
there), but not much else and not in POSIX.

-- 
Stephane


  reply	other threads:[~2021-05-18 18:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16 15:24 $PPID not updated when the PPID changes (parent killed) Vincent Lefevre
2021-05-16 18:37 ` Bart Schaefer
2021-05-17 20:26   ` Vincent Lefevre
2021-05-17 21:00     ` Bart Schaefer
2021-05-17 22:27       ` Phil Pennock
2021-05-17 23:15         ` Bart Schaefer
2021-05-18  0:30           ` Phil Pennock
2021-05-18  1:14             ` Bart Schaefer
2021-05-18  8:28             ` Vincent Lefevre
2021-05-18  8:15           ` Vincent Lefevre
2021-05-18 14:53             ` Bart Schaefer
2021-05-19  4:25               ` Bart Schaefer
2021-07-18 23:10                 ` Lawrence Velázquez
2021-05-18 15:18           ` Mikael Magnusson
2021-05-18 16:14             ` Peter Stephenson
2021-05-18 18:20               ` Bart Schaefer
2021-05-18 17:37           ` Martijn Dekker
2021-05-18 18:08             ` Bart Schaefer
2021-05-18 19:40               ` Martijn Dekker
2021-05-18 18:06           ` Stephane Chazelas
2021-05-18 18:12             ` Bart Schaefer
2021-05-18 18:50               ` Stephane Chazelas [this message]
2021-05-18 15:56         ` Stephane Chazelas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210518185039.7zo76vofxrn6qqqd@chazelas.org \
    --to=stephane@chazelas.org \
    --cc=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).