[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-bash] Why bash has two sets of options (controlled by `set' an
Re: [Help-bash] Why bash has two sets of options (controlled by `set' and `shopt')
Mon, 26 Oct 2015 17:14:48 +0000
2015-10-26 12:24:46 -0400, Chet Ramey:
> On 10/26/15 11:32 AM, Eduardo A. Bustamante López wrote:
> > On Mon, Nov 09, 2015 at 09:38:51PM +0800, ziyunfei wrote:
> >> But some options like "keyword", "onecmd" and "errtrace" are not in the
> >> POSIX standard.
> > That's true. I don't know the answer to that. Let's wait for Chet to reply.
> They exist so all the single-letter `set' options have `set -o'
> equivalents. I added `set -E' (errtrace) so it would be parallel to
> `set -e'; it's not in Posix. If I had to do it again, I probably would
> not add it to `set' at all.
So, is the rule:
an option is a set -o (SHELLOPTS) option as opposed to a shopt
option (BASHOPTS) if it has a corresponding single-letter "set"
option, or is in POSIX (ignoreeof, vi) or is also in ksh (emacs,
But then, what about login_shell and globstar which are in ksh
but in BASHOPTS. And history, posix or interactive-comments that
don't have single letter options, and are not in ksh or POSIX?