bug-bash
[Top][All Lists]
Advanced

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

Re: Bash manual - interactive shell definition


From: Ken Irving
Subject: Re: Bash manual - interactive shell definition
Date: Fri, 12 Mar 2010 00:55:04 -0900
User-agent: Mutt/1.5.20 (2009-06-14)

On Fri, Mar 12, 2010 at 12:50:26AM -0900, Ken Irving wrote:
> On Fri, Mar 12, 2010 at 09:16:05AM +0000, Marc Herbert wrote:
> > >> Could this sentence:
> > >>
> > >> "An interactive shell is one started without non-option arguments,
> > >> unless -sis specified, without specifying the
> > >> -c option, and whose input and error output are both connected to 
> > >> terminals
> > >> (as determined by isatty(3)), or one started with the -i option. "
> > >>
> > >> be any more confusing?
> > > 
> > > Is seems pretty clearly stated to me.
> > 
> > Please enlighten us with the priority of English boolean operators.
> > 
> > I have never seen a natural language sentence with so many boolean 
> > operators.
> 
> Well I can try.
> 
>     An interactive shell is one started without non-option arguments,
> 
> If there are any arguments then they must be options...
> 
>     unless -s is specified,
> 
> bash(1) says: "If the -s option is present ... then commands are read
> from the standard input", which clearly is not interactive. 
> 
>     without specifying the -c option,
> 
> The -c option is accompanied by a string containing the commands to be run,
> so the shell is not interactive.
> 
>     and whose input and error output are both connected to terminals (...),
> 
> Without which there'd be nothing for it to interact with.
> 
>     or one started with the -i option.
 
I let the previous reply fly before ready...

The -i option would seem to override the other conditions, declaring the
shell to be interactive even if it wouldn't otherwise be.

I'm not saying the sentence is trivial to parse, but I don't see any
ambiguities in the definition.

Ken





reply via email to

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