bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash manual on interactive shell


From: Ángel
Subject: Re: bash manual on interactive shell
Date: Sun, 19 Dec 2021 02:13:59 +0100

On 2021-12-13 at 11:23 +0000, Kerin Millar wrote:
> You mentioned being confused by how the and's and or's combine. The
> wording of the bash man page seems marginally less ambiguous in that
> regard, partly owing to its sparse use of the comma.
> 
> "An interactive shell is one started without non-option arguments
> (unless -s is specified) and without the -c option whose standard
> input and error are both connected to terminals (as determined by
> isatty(3)), or one started with the -i option."
> 
> Although, I would say that the absence of a comma before whose is a
> grammatical error. In any case, I wanted to suggest the use of the
> word, either. For example:-
> 
> "An interactive shell is either one started without non-option
> arguments (unless -s is specified) and without the -c option whose
> standard input and error are both connected to terminals (as
> determined by isatty(3)), or one started with the -i option."
> 
> I think that the addition of this word might increase the probability
> of the sentence being (correctly) interpreted in the fashion of "an
> interactive shell is either one that fulfils ( criteria A ) or (
> criteria B )", keeping in mind that the -i option always renders bash
> interactive.

I think it is much simpler than what the existing definition (and the
mentioned proposals) do by describing non-option arguments, and those
two options.

It all boils down to "bash doesn't have anything to run"

Thus I propose:
«An interactive shell is one which was provided no command to run
(neither by directly receiving a file after all options and their
arguments nor by use of -c or -s options) and whose standard input and
error are both connected to terminals (as determined by isatty(3)), or
one explicitly started with the -i option.»


Regards






reply via email to

[Prev in Thread] Current Thread [Next in Thread]