Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: what does 'interactive' mean?

# thomas.paulsen@xxxxxxxxxxx / 2021-08-10 11:04:03 +0200:
> Hi, 
> what *is* an "interactive shell"?
> see: https://tldp.org/LDP/abs/html/intandnonint.html

let's assume you read and understood my email for a bit.
the answer to "what is an interactive shell" then is
"one with the 'interactive' option set".  let's ignore for
a moment that zsh -i is where the email kicks off.  this is your

then you're saying that the first complete sentence in the zsh(1)
man page aka '(zsh)Introduction' info node which currently reads

  Zsh is a UNIX command interpreter (shell) usable as an interactive
  login shell [...]

can be replaced with

  Zsh is a UNIX command interpreter (shell) usable as a login shell
  in which the 'interactive' option is on

i think you'll agree that this is not true, because while everyone
knows that "interactive shell" means the REPL you get in your xterm
or whatever, while the latter carries no such connotation.

i showed in the email you replied to that -i can be freely set or
unset without any impact on the shell presenting the REPL (or not),
same goes for the [[ -t 0 ]] test which i also included in my email.

no, i don't think you read the email you replied to.

while i'm at it, the articly is so wrong it's not even wrong:

as you surely know, options set or unset in a shell have no
influence on options set or unset in a script *executed* by said
shell, the same is true for parameters (shell parameters do not
equal the environment), mutatis mutandis.  here's a demonstration
in bash:

$ cat ./demo
echo $- PS1=$PS1

$ . ./demo
himBHs PS1=\$
$ ./demo
hB PS1=

the only bits in the article that make any sense are attributed to
other people including zsh's SChazelas, and clearly were included
well after the article / book was published.  the author had *no
clue* about the subject matter.

you may want to reconsider paying any attention to that publication.


Messages sorted by: Reverse Date, Date, Thread, Author