[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Clarify the meaning of 's' in $- and the meaning of -s w
From: |
Stephane Chazelas |
Subject: |
Re: [Help-bash] Clarify the meaning of 's' in $- and the meaning of -s when invoking bash |
Date: |
Thu, 16 Mar 2017 13:16:32 +0000 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
2017-03-16 08:27:53 +0100, address@hidden:
[...]
> It seems to me that the 's' flag is supposed to be shown in $- when
> bash reads the standard input. Such a case occur when bash is invoked
> with the -s option. Example:
>
> $ echo 'echo $-' | bash -s
> hBs
>
> However, bash reads the standard input also when there are no more
> arguments after option processing. Example
>
> $ echo 'echo $-' | bash
> hB
[...]
That was a non-conformance (or at least deviation from every
other Bourne-like shell) of bash. It was fixed in 4.4
$ echo 'echo $- $BASH_VERSION' | bash
hBs 4.4.11(1)-release
IIRC, that was discussed last year either on the Austin group or
bug-bash mailing list.
--
Stephane