Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
$SHLVL origin (was: $PPID not updated when the PPID changes (parent killed))
- X-seq: zsh-workers 48886
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: $SHLVL origin (was: $PPID not updated when the PPID changes (parent killed))
- Date: Tue, 18 May 2021 19:50:39 +0100
- Archived-at: <https://zsh.org/workers/48886>
- In-reply-to: <CAH+w=7YR5OagGbTWT1fuQfDJvrZBekBgZUQKh6kfWe1TtW-aQQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh hackers list <zsh-workers@xxxxxxx>
- References: <20210516152418.GA39669@zira.vinc17.org> <CAH+w=7a3y6MjrPQWnPc1O0ESroLesZXwaQ-_AxJB5XRk7xDj2Q@mail.gmail.com> <20210517202608.GA3255290@zira.vinc17.org> <CAH+w=7bhsp71vazSJ_9Un1btb4mrxBgUciUg4zfGv15LeUfT1g@mail.gmail.com> <YKLttAsFd4bl9waS@fullerene.field.pennock-tech.net> <CAH+w=7bywj1X1fyPLgpmo_OoqBEN8PjEDxDeKP-tMR_O4g04tg@mail.gmail.com> <20210518180601.4q6o3xpeva7uhyjo@chazelas.org> <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@xxxxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author