The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: markus schnalke <meillo@marmaro.de>
To: tuhs@minnie.tuhs.org
Subject: Re: [TUHS] Shell Level...
Date: Mon, 20 Jan 2020 09:15:56 +0100	[thread overview]
Message-ID: <1itSE0-5Td-00@marmaro.de> (raw)
In-Reply-To: <f8fe34ae-e3e3-dfbd-8bc8-15bc58474062@spamtrap.tnetconsulting.net>

Hoi.

[2020-01-19 14:22] Grant Taylor via TUHS <tuhs@minnie.tuhs.org>
>
> 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.


> Someone also mentioned quickly starting a new sub-shell from the current 
> shell for quick transient tasks, i.e. dc / bc, mount / cp / unmount, 
> {,r,s}cp, etc., in an existing terminal window to avoid cluttering that 
> first terminals history with the transient commands.

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

This all pretty much depends on your working habits, of course.
For instance, I never use history expansion but search the
history frequently, thus additional entries in the shell history
are no problem. I rather like to have all shell histories merged
into one for having search access to all the commands I executed.
This seems to be more of a modern shell usage concept.

Job control, OTOH, I use a lot, to suspend the editor, grep for
something, resume the editor, and the like. Which seems to be more
of an older style usage concept.


> That got me to wondering if there were other uses for shell level 
> ($SHLVL).  Hence my question.

I'm interested as well, as I've got difficulties imagine these
uses.


One thing to clarify: Are you looking for uses of the shell
variable $SHLVL or for uses of frequent sub shells?


meillo

  parent reply	other threads:[~2020-01-20  8:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-19 21:22 Grant Taylor via TUHS
2020-01-19 23:21 ` Thomas Paulsen
2020-01-20  8:15 ` markus schnalke [this message]
2020-01-20  8:39   ` Kurt H Maier
2020-01-21 20:42     ` Grant Taylor via TUHS
2020-01-20 19:40   ` Theodore Y. Ts'o
2020-01-20 23:51     ` Terry Jones
2020-01-21 20:44     ` Grant Taylor via TUHS
2020-01-21 23:10       ` Theodore Y. Ts'o
2020-01-20 23:55   ` Greg A. Woods
2020-01-21 20:46     ` Grant Taylor via TUHS
2020-01-21 23:39       ` Greg A. Woods
2020-01-20 23:43 ` Greg A. Woods

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=1itSE0-5Td-00@marmaro.de \
    --to=meillo@marmaro.de \
    --cc=tuhs@minnie.tuhs.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.
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).