From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from minnie.tuhs.org (minnie.tuhs.org [45.79.103.53]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 4cf1b57d for ; Mon, 20 Jan 2020 23:52:10 +0000 (UTC) Received: by minnie.tuhs.org (Postfix, from userid 112) id 3277F9C14A; Tue, 21 Jan 2020 09:52:09 +1000 (AEST) Received: from minnie.tuhs.org (localhost [127.0.0.1]) by minnie.tuhs.org (Postfix) with ESMTP id 153839C0FD; Tue, 21 Jan 2020 09:51:50 +1000 (AEST) Authentication-Results: minnie.tuhs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=jon-es.20150623.gappssmtp.com header.i=@jon-es.20150623.gappssmtp.com header.b="K1Cyk4s8"; dkim-atps=neutral Received: by minnie.tuhs.org (Postfix, from userid 112) id 724F09C0FD; Tue, 21 Jan 2020 09:51:47 +1000 (AEST) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by minnie.tuhs.org (Postfix) with ESMTPS id 71FCA9BFE6 for ; Tue, 21 Jan 2020 09:51:46 +1000 (AEST) Received: by mail-lf1-f42.google.com with SMTP id v201so638263lfa.11 for ; Mon, 20 Jan 2020 15:51:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jon-es.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=IDwcE30gLmNfSVKKChBHGnzdgL9S3tFtst1Md+/P64A=; b=K1Cyk4s8cVc4Bvhu74xJExUlc092SefQS7IhPCUkgBpKe6sMe07kU2+EBOKp5Ctl1q rGjBjigt860GklxTsvw3/xes5jREmCV/jwhbnrtzo6SmWhijqLKxSyl17la6nQyFXX4U v6D6g2Gx61rZo5X+KI+RS5GTndFuNzCjwtncH9hOXhw/Qfy01w6wjmC/KOjrLzjuO1BO lAeaxS/CwVXD0eohpg8SR1AUZMOeAvV4keCLSW4JqCxVtlTxXT0WYKKMqJ1a0T2CXOS6 V77LNzUIqWJOH5AnD9ZnH1+jPXmEZzIR3tjMAP/U/ew9MeNBH7v68TIwyZfJ5aDwRDLH C7ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=IDwcE30gLmNfSVKKChBHGnzdgL9S3tFtst1Md+/P64A=; b=ldOty55H5PWqEEoAyar+CDnU5U/iPfO0tBWyjXbq9MfyaU2HUCWl/z35GhQFBxuo4n Wpv0CDjCMe2p7i3LEI1OPLMAJeen2y1JH3C11/tTPUS0WHBz02+G/5iesVh71piLEHWF pvNxek3SuOpZuuIjtEeMIxXLZYyViIWiaGCh3JnxFOXC1ihr0M/0/bEoH30yMWUHs0rk CBfH2pamkgY/rADKj+NxvGhVwuf354HQch6NalGs1hj5tWLf12EZKGrXBha89O9MsvI3 Kfd/HDbEgq4QswwY3b17x87+Hrd9eZvo0/HA224csxNxgk2rao731KuKtmDlEw1nff53 fCAA== X-Gm-Message-State: APjAAAW7kTNLeaPsw/z/3xbutS3QdMMRxjgQnbyhTygDosgoXYuATDOP ofAPKUGqcIUA8ykxVU+IB5N9gjXH6OVw0zdrt8vtHA== X-Google-Smtp-Source: APXvYqxg3omJ2whqJKX1Y+CoHaD1iLH+vUAqypKDr3p4z1ktS9IHdSq+DYO1g7Tg9TohX13L8kIFxwNthxxPbebt2HY= X-Received: by 2002:ac2:555c:: with SMTP id l28mr987602lfk.52.1579564304813; Mon, 20 Jan 2020 15:51:44 -0800 (PST) MIME-Version: 1.0 References: <1itSE0-5Td-00@marmaro.de> <20200120194057.GI15860@mit.edu> In-Reply-To: <20200120194057.GI15860@mit.edu> From: Terry Jones Date: Tue, 21 Jan 2020 00:51:33 +0100 Message-ID: To: "Theodore Y. Ts'o" Content-Type: multipart/alternative; boundary="00000000000049d5d5059c9af90d" Subject: Re: [TUHS] Shell Level... X-BeenThere: tuhs@minnie.tuhs.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: The Unix Heritage Society mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tuhs@minnie.tuhs.org Errors-To: tuhs-bounces@minnie.tuhs.org Sender: "TUHS" --00000000000049d5d5059c9af90d Content-Type: text/plain; charset="UTF-8" I also make new shells fairly regularly, about half the time because I wan to set some variables that I don't want to have to reset. Then if/when I forget which window I was in, I can check with SHLVL (at least when using bash, which I normally don't do). But I'm normally in & out of the sub-shells very quickly so don't often need to check. Terry On Mon, Jan 20, 2020 at 8:43 PM Theodore Y. Ts'o wrote: > On Mon, Jan 20, 2020 at 09:15:56AM +0100, markus schnalke wrote: > > Hoi. > > > > [2020-01-19 14:22] Grant Taylor via TUHS > > > > > > Have you ever used shell level, $SHLVL, in your weekly ~> daily use of > Unix? > > > > What's the use of it? The only use of $SHLVL I can think of is the > > answer to the question if ^D will close the last shell or just a > > sub shell. I hardly ever ask myself this question. Probably that > > starts to become relevant when you open sub shells frequently. > > > > The normal reason why I'm starting subshells is because I need to > control various environment variables on an ad-hoc basis. It might be > PYTHONPATH, KRB5CCNAME, GPG_AGENT_INFO, LD_LIBRARY_PATH, or some > combination of the above. Back when I was regularly using Kerberos > root/admin bits, I had some hard-coded shell aliases to indicate > explicitly I was in a shell that was using my > tytso/root@ATHENA.MIT.EDU or tytso/admin@ATHENA.MIT.EDU kerberos > tickets. > > But for ad-hoc use cases, SHLVL is great way to track whether I'm a > non-standard shell environment. For me, some use case probably comes > up at least week or two. > > > With tmux or screen at hand, this use case is obsolete for me. > > (Besides, my shell doesn't know about $SHLVL.) > > Before I was using bash regularly, I had hard-coded something like > SHLVL in my .tcshrc. > > - Ted > --00000000000049d5d5059c9af90d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I also make new shells fairly regularly, about half t= he time because I wan to set some variables that I don't want to have t= o reset.=C2=A0 Then if/when I forget which window I was in, I can check wit= h SHLVL (at least when using bash, which I normally don't do).=C2=A0 Bu= t I'm normally in & out of the sub-shells very quickly so don't= often need to check.

Terry


On Mon, Jan 20, 2020 at 8:43 PM Theodore Y. Ts'o <tytso@mit.edu> wrote:
On Mon, Jan 20, 2020 at 09:15:56AM +0100, mar= kus schnalke wrote:
> Hoi.
>
> [2020-01-19 14:22] Grant Taylor via TUHS <tuhs@minnie.tuhs.org>
> >
> > Have you ever used shell level, $SHLVL, in your weekly ~> dail= y use of Unix?
>
> What's the use of it? The only use of $SHLVL I can think of is the=
> answer to the question if ^D will close the last shell or just a
> sub shell. I hardly ever ask myself this question. Probably that
> starts to become relevant when you open sub shells frequently.

<Raises hand>

The normal reason why I'm starting subshells is because I need to
control various environment variables on an ad-hoc basis.=C2=A0 It might be=
PYTHONPATH, KRB5CCNAME, GPG_AGENT_INFO, LD_LIBRARY_PATH, or some
combination of the above.=C2=A0 Back when I was regularly using Kerberos root/admin bits, I had some hard-coded shell aliases to indicate
explicitly I was in a shell that was using my
tytso/root@ATHENA.= MIT.EDU or tytso/admin@ATHENA.MIT.EDU kerberos
tickets.

But for ad-hoc use cases, SHLVL is great way to track whether I'm a
non-standard shell environment.=C2=A0 For me, some use case probably comes<= br> up at least week or two.

> With tmux or screen at hand, this use case is obsolete for me.
> (Besides, my shell doesn't know about $SHLVL.)

Before I was using bash regularly, I had hard-coded something like
SHLVL in my .tcshrc.

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 - Ted
--00000000000049d5d5059c9af90d--