From mboxrd@z Thu Jan 1 00:00:00 1970
X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org
X-Spam-Level:
X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,
DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY
autolearn=ham autolearn_force=no version=3.4.4
Received: (qmail 1675 invoked from network); 10 Aug 2021 12:13:01 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 10 Aug 2021 12:13:01 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628597581;
b=LuIb+/zb1H9Ydb2jU+tHjwntn6SCdS7vQA4YKz9IIhQGW6d9rEqwNIHpSmEeEKqBLdHLmqBumU
uCweU7piC/aEHmO6Ncxh6O5FHe5jDrm28XSBA6mjqEUy6IUKh6BUKynhyg8P0S4fu2FQ05dWyq
bsAUx/wVGB6C1E0Z3tHXg+xqXmG9RvYkkGUkD1UyhKFES9fgUhO/QiO7vNaJtt48ROT3eD2CGY
uqWPA4ylzT+imD+GGue5uz9inOqhpoMgIxcJQEuwjN1hbso7n+ecC1kefnJ2OimZEycJi72fOl
wWW+th7L4PFOnlIc09Fv7jvOG1Ilfy3kTF3Ws8mupwjQhA==;
ARC-Authentication-Results: i=1; zsh.org;
iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1628597581;
bh=iKFclpSl/VCW1eGRdUlhdDglaSRreznLjqefduj9dQM=;
h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help:
List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:
References:In-Reply-To:Message-ID:To:From:Date:DKIM-Signature:
DKIM-Signature;
b=UccfpdUvTE8GaUIeNP76uEq2Pb7Ma8ApiBV5Usr5ltj9slUTrKc3OUkZgVv9mVyHG9DbP6orTJ
TdTSkHRiziuoXmMlvqbLnqVbVR8I42f+VWKvnpoLXGC/cnn0U4RIxjN537raFXzl/xSAonWuuJ
TUzPZsXy0K9w1i1F00lLZnph67P10J9ZiKLUdvQOX8a91lBEjV5BZ3UmAQAvGJq7/iM3sW4Hrp
IjJdxzHdq1hPL9LJybR8rswqEHKvx7zDXIThPt5ZGx/eMcqr4EVekOrCsJWZDInNJxXppAYU1D
XDhd5owhnbl0pcOrlG6SrccX/t6N554lSosUtCEqVrz8NQ==;
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org;
s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:
List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding:
Content-Type:MIME-Version:Subject:References:In-Reply-To:Message-ID:To:From:
Date:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID;
bh=8RgOanoqnS6QrCD8qS+vJMOBGU48WHPpN84OpXciJ+I=; b=iH7ipn0rtFpjbtw04QEBX0i4P3
5uxW8z++bQYltzOsT+w62awpAoRfQEQoBP9mk0ImZPwar8sABGjzRmwA8Xm7cX8NNypJGf9bNsVm3
bzeRX8c8pPqcqbfWhn0mZv47tOGWA3TeCqmDh/zhvXVs514PwAbUabpoyY/h6OWG0b/LDknEfUDEz
2GQqc2n0xjx7wNj1PGSmawo98In0m4GDa0fraUF9DOb6HDL4BRv+SscHlnd0pHYbXeU4B9HnaRr+8
2/JsHZInQhACg03ShgyjSBtctlSUVfJoHDoCOpR7lNCu4z67RVstgz4dmR8DI4OoArfatbo/GKLFB
gc11FfFA==;
Received: from authenticated user by zero.zsh.org with local
id 1mDQcv-000GxM-91; Tue, 10 Aug 2021 12:13:01 +0000
Authentication-Results: zsh.org;
iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:49910)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128)
id 1mDQbz-000GFd-5u; Tue, 10 Aug 2021 12:12:03 +0000
Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net)
by smtpq1.tb.ukmail.iss.as9143.net with esmtp (Exim 4.86_2)
(envelope-from
)
id 1mDQby-0007nN-LU
for zsh-users@zsh.org; Tue, 10 Aug 2021 14:12:02 +0200
Received: from oxbe8.tb.ukmail.iss.as9143.net ([172.25.160.139])
by smtp1.tb.ukmail.iss.as9143.net with ESMTP
id DQbymevSThdxkDQbymQZk9; Tue, 10 Aug 2021 14:12:02 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-users@zsh.org
X-SourceIP: 172.25.160.139
X-CNFS-Analysis: v=2.4 cv=Ru2mkAqK c=1 sm=1 tr=0 ts=61126d12 cx=a_exe
a=pgSR3NrKiwmx/6vnWRL19w==:117 a=sfM75MaK4YAA:10 a=IkcTkHD0fZMA:10
a=2y5beTJ5bSgA:10 a=QTqIaKMF-TOD0JDv8JwA:9 a=QEXdDO2ut3YA:10
X-Authenticated-Sender: p.w.stephenson@ntlworld.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com;
s=meg.feb2017; t=1628597522;
bh=iKFclpSl/VCW1eGRdUlhdDglaSRreznLjqefduj9dQM=;
h=Date:From:To:In-Reply-To:References:Subject;
b=CxMxG27YZWP4JASXel5jjZbSGwHonl0Kl+3LPazQij/hsn6vGRrTGrglmKUu5Q/S3
gPyTfXVIt+nQ6CgUZlBp4WLq2+RnmAtR1ZwkSbuzk6ygGkRyl2+YPYI7DzK2dOTAaB
vqxGP5NIeUWVFuEoXd5YQa04yT/jNx2gVMRNMs5paSIJyVLHxq56KSieljY66mNn3B
eng2ix05w+kpheahw1E3Ng7Rf0gzZFFfeOkz7287tOOPOr7tGqyRCa2XilSiTuIKVk
kzTFmF+l6L0pTc6QG8h/j3EQqTVCx3lJCM6U7MgqzdmXH/gItjAQRny4o7sykKJo82
LkmmBhIhxmmfg==
Date: Tue, 10 Aug 2021 13:12:02 +0100 (BST)
From: Peter Stephenson
To: Roman Neuhauser , zsh-users@zsh.org
Message-ID: <939622201.802587.1628597522569@mail2.virginmedia.com>
In-Reply-To:
References:
Subject: Re: what does 'interactive' mean?
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Medium
X-Mailer: Open-Xchange Mailer v7.8.4-Rev72
X-Originating-IP: 165.225.81.118
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfGc/3TrHJoH9VOk1IozZrjiTpiQZWgKCCQGoJX0y15Z2zvDeUZUZZu4FGwqeeg1xKuG1cDrtIxFIA7xjlN+lvtE6XF/9100G9vNpmWOPz6+oG9XFQpwS
YcF+fvpiYcX2AFYr9GVsZo/pU94OzwijGMuco2k+/2W/zIhmy7TH9c5COkI6hs4zGxn0B9C2UYRD1q5ofxTYNp0uB2+G+Yj6OyfUsycrCvcWAeKeEqCs8RNW
/R2hgX8LKTQ18JviWt6zwA==
X-Seq: 26889
Archived-At:
X-Loop: zsh-users@zsh.org
Errors-To: zsh-users-owner@zsh.org
Precedence: list
Precedence: bulk
Sender: zsh-users-request@zsh.org
X-no-archive: yes
List-Id:
List-Help:
List-Subscribe:
List-Unsubscribe:
List-Post:
List-Owner:
List-Archive:
> On 10 August 2021 at 03:58 Roman Neuhauser wrote:
> the description of INTERACTIVE in zshoptions(1) contains
> *no mention of its effects*!
>
> INTERACTIVE (-i, ksh: -i)
> This is an interactive shell. This option is set upon
> initialisation if the standard input is a tty and commands are
> being read from standard input. (See the discussion of
> SHIN_STDIN.) This heuristic may be overridden by specifying a
> state for this option on the command line. The value of this
> option can only be changed via flags supplied at invocation of
> the shell. It cannot be changed once zsh is running.
As you say, the documentation is confusing. What it's trying to say,
but not making a good job of, is that basically the conditions
here (tty on STDIN with commands coming from it, which cause the
INTERACTIVE option to be set) define an interactive shell --- the
option is the consequence, not the cause. But then you can
actually force the option on or off (sometimes that's even useful),
so that's just a test by default.
I suppose that paragraph really needs dividing into a bit
(that doesn't necessarily belong here) that explains the logic
the shell uses to decide if it's interactive if you don't override
it, and then this bit saying how the option behaves.
The shell tests the option internally in a great number of places
to see if it's appropriate to output prompts, use the line editor,
etc. etc. Mostly this is mentioned in the manual, but only
with something like "if the shell is interactive..."
This becomes more useful if you know it's testing the
option when that happens, so somewhere we need a sentence along
the lines of "where the shell needs to decide if it is
interactive at run time, it tests the state of the INTERACTIVE shell
option. See XXXX for information on this".
In summary, the information to get across in some form is the following:
- At run time the shell tests the option INTERACTIVE to decide if it is
interactive. This is to be understood anywhere in the manual where
"an interactive shell" is mentioned.
- This option may be set or unset at shell initialisation by passing
appropriate options in the command line that invokes the shell.
- If the option is not explicitly set or unset in this way, it is
initialised to "set" if standard input is a terminal and is being used
for command input, and to "unset" otherwise.
- The option may not be altered after shell initialisation.
Of course, there may still be something I'm missing.
pws