zsh-users
 help / color / mirror / code / Atom feed
From: "Lawrence Velázquez" <larryv@zsh.org>
To: zsh-users@zsh.org
Subject: Re: what does 'interactive' mean?
Date: Tue, 10 Aug 2021 15:30:27 -0400	[thread overview]
Message-ID: <d0d5e4a0-a0ea-435a-980d-921be2012957@www.fastmail.com> (raw)
In-Reply-To: <529da2fd-0718-847a-c939-63ce4d48b9ec@eastlink.ca>

On Tue, Aug 10, 2021, at 12:48 PM, Ray Andrews wrote:
> On 2021-08-10 9:34 a.m., Peter Stephenson wrote:
> >
> > Very very very very very roughly, "interactive" in this sense means it's
> > showing you prompts and bringing up a line editor to edit the command line.
> >
> Well that's the thing.  Thomas can be forgiven for being a bit unclear 
> about what it all means.  The docs basically assume you already know.  
> But that's very roughly how I understand it -- no prompts if not 
> interactive.
> > Being "non-interactive" doesn't mean you can't interact with the shell.
> > There's still probably a standard input and output.
> Just when I thought I understood it :-(  So 'non-interactive' might be 
> interactive after all?  It would take some writing skill to really 
> elucidate this.

While I empathize with the desire to concisely define terms like
"interactive shell", I've always found that approach unhelpful,
both practically and pedagogically.  Same with "login shell".  In
a very real sense, a shell is an interactive shell and/or a login
shell if it thinks it is.  The important things are how the shell
comes to think that and how it consequently changes its behavior.
The former is described in zshoptions(1) and a little in zsh(1).
The latter is distributed throughout the documentation because
there's a great deal of behavior to describe.

(Even POSIX doesn't rigorously define "interactive shell" [*].)

I understand that this approach might be intellectually unsatisfying,
but it avoids ontological hangups.  Rather than thinking very hard
about what "interactive" means, ask "how does [behavior X] change
in an interactive shell?"

  [*]: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_198

-- 
vq


  parent reply	other threads:[~2021-08-10 19:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-10  2:58 Roman Neuhauser
2021-08-10  9:04 ` Thomas Paulsen
2021-08-10 13:00   ` Roman Neuhauser
2021-08-10 12:12 ` Peter Stephenson
2021-08-10 13:47   ` Roman Neuhauser
2021-08-10 13:54     ` Peter Stephenson
2021-08-10 15:30   ` Ray Andrews
2021-08-10 16:34     ` Peter Stephenson
2021-08-10 16:48       ` Ray Andrews
2021-08-10 19:00         ` Bart Schaefer
2021-08-10 22:33           ` Ray Andrews
2021-08-10 19:30         ` Lawrence Velázquez [this message]
2021-08-10 22:38           ` Ray Andrews
2021-08-10 23:08             ` Bart Schaefer
2021-08-10 23:26               ` Ray Andrews
2021-08-10 23:30                 ` Bart Schaefer

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=d0d5e4a0-a0ea-435a-980d-921be2012957@www.fastmail.com \
    --to=larryv@zsh.org \
    --cc=zsh-users@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).