At Tue, 21 Jan 2020 13:46:14 -0700, Grant Taylor via TUHS <tuhs(a)minnie.tuhs.org>
wrote:
Subject: Re: [TUHS] Shell Level...
[1 <text/plain (en-US); windows-1252 (quoted-printable)>]
On 1/20/20 4:55 PM, Greg A. Woods wrote:
I've always just used "set
ignoreeof" (first in Csh and later in
Ksh), but just in my initial login shell (i.e. set in ~/.login), to
prevent ^D from logging me out.
It sounds like you're making your initial / login shell behave
differently based on the shell level.
More like the other way around -- all sub-shells behave differently
based on the fact they're not login shells. Note I also considered (and
still consider) all initial shells in each "window" to be a "login"
shell. In the days of "layers" (e.g. on the DMD5620) I did that by
inspecting the environment to look for clues that the shell was started
by "layers", but ever since X11 took over my life (and my DMDs have been
scrapped and/or put into storage) I've used XTerm's "-ls" option to
make
the shell a "real" login shell.
The $LEV (or $SHLVL) value is just an indicator, one that I only ever
used as a visual cue/clue.
--
Greg A. Woods <gwoods(a)acm.org>
Kelowna, BC +1 250 762-7675 RoboHack <woods(a)robohack.ca>
Planix, Inc. <woods(a)planix.com> Avoncote Farms <woods(a)avoncote.ca>