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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 12785 invoked from network); 10 Aug 2021 13:48:55 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Aug 2021 13:48:55 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1628603335; b=GSYACC6dx7R1wdfQDHEjMwuytleDWcN83mBICvpaBuoh+z3pPlTj1qUhiFi1IHKpFb6oKa7Hhe Miraw0ERjbO2klI54BmGXavnQy7bfAbB4K7zzrhQsUibezb4BxrCI7HBglpvcUSxeMCgLx9nV9 bVU5VXixCJ3FyUxlbOv/1PEbtUIkcP+XKXViT1KxQb/c4+82iUnrzmPsv+gfvHl7rPAK7g2FJv ZAN377XJ0mE0Blx8um0VZTXSyiOQV9JYM+Z7howbsKOjseSkqLieubvJdGpBzUofhnGYePNZ3z +T6ENm+MVaDQl0ryrXrR8yieo4+kK3pblb/GpPmEai4kwA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (a.mx.sigpipe.cz) smtp.remote-ip=37.221.242.114; dmarc=none header.from=sigpipe.cz; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1628603335; bh=VEM97gdWmXI1D4AVZKVin8OV70r34+QFimlsThGNsa4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature; b=d2TktgsMNrGntExGdMNr3jaqDiEG+77rmOZz2eFBr+LZJz9K0eg1JT8HTe6Tb9JDn4CA+AjQ/6 LFuLtSOOSaYPo4fSPf4svd0Qnq9HMiKMrObWg2kkXs0/FN3jZWVXx5LUOd4LUtF5YZBbHODP98 C9EOOK8h07Ts68x9abZY/vyNP8wso43XtNuC8i6enkd+0lhm84CU1UYAvNZk6JpJyKqudkAUM6 FigL1MeFxZOTy8wAa2MYwSO5Z0qBaT1mQ6nuVdvZADp0PRUaHaBm2B4zfh3BggkEhYn7YZc4nj gWclUqIH4xEMizM1BNl+yRdz3DjOu8pCnlWl4seMFDEmYA==; 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:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=fo/SaS5rlcJrwAwoNNp+54xQwPI0w4kdMUsMNps8vs0=; b=W+Zk2ylK2gmF09ithgKJrWhKz4 sRSv3D5FHY2fYQvK95G7aE+3NrPFM0eH/wzHgiU1VzyQlNaliwxjqqGN0aZOZyubaTizhagT4ImBw GUZRZL5OvfOYcxNcs5bsNirjUGZTliGHvwed4sLIYVz9j0f83QrPQqf9p5wJy/Lkq1Z+FXNIF3sPJ r46EqUWNo43Ad0tnx0V0d8vVGevT1EdwdCGzmjEe1pDVIZ//tyCPrKqNaWZ5T2IXO44ZkYPRrv2Rr IH6omvUkZicohfLmmwNAFxSrp0jo7PtlevPMeQat1AWUmIDRrSOK23P5L+wX6c+6u9I0XSTbagl88 Luw9gyGg==; Received: from authenticated user by zero.zsh.org with local id 1mDS7j-000N5B-Lg; Tue, 10 Aug 2021 13:48:55 +0000 Authentication-Results: zsh.org; iprev=pass (a.mx.sigpipe.cz) smtp.remote-ip=37.221.242.114; dmarc=none header.from=sigpipe.cz; arc=none Received: from a.mx.sigpipe.cz ([37.221.242.114]:2118) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mDS6p-000MLE-6V; Tue, 10 Aug 2021 13:48:00 +0000 Received: by a.mx.sigpipe.cz (Postfix, from userid 1001) id B6C5A15586643F; Tue, 10 Aug 2021 15:47:58 +0200 (CEST) Date: Tue, 10 Aug 2021 15:47:58 +0200 From: Roman Neuhauser To: Peter Stephenson Cc: zsh-users@zsh.org Subject: Re: what does 'interactive' mean? Message-ID: References: <939622201.802587.1628597522569@mail2.virginmedia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <939622201.802587.1628597522569@mail2.virginmedia.com> X-Seq: 26891 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: # p.w.stephenson@ntlworld.com / 2021-08-10 13:12:02 +0100: > > 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 you're on the right track here. one thing i tried to convey was that the manual overloads the meaning of "interactive shell" (the colloquial use in the blurb vs. the should-be-precise technical one basically everywhere else), and that "interactive shell" is too entrenched as an informal coin to be useful in a technical reference, that ship has sailed. with that in mind, i don't think the proposed definition is useful, or rather, the conditions should be called something other than "interactive shell" because that is usually understood to include some kind of online editing facility a la ZLE. you could strip zsh down so much its interactive mode would behave like '>>(zsh)' and it would still fit the definition you offered here. nobody would accept that as an "interactive login shell". i think we already have a name for that set of conditions, it's called "the INTERACTIVE option is set"! > 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". i disagree, this is an unnecessary indirection. i propose s/if the shell is interactive/if the INTERACTIVE option is set/g it's longer by a negligible margin and needs no further cross-reference. aaand then there's the smaller fish i mentioned, like the text about the ZLE option being misleading at the very least. i'll get back to you later about that. while i love back-seat driving this is not meant that way. i'd like to have a patch for this ready by the weekend and then continue with other parts of the manual that in my opinion don't work as well as they should and could. there'll be no ambushes though, you can always expect a rant first so we can discuss the issue and see where we meet. -- roman