bug-bash
[Top][All Lists]
Advanced

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

make test errata (part 2)


From: Martin D Kealey
Subject: make test errata (part 2)
Date: Sun, 15 Dec 2024 00:35:15 +1000

(see first part for background)

I've patched Bash to merge “shopt” and “set -o”, and now “make tests”
reports some minor differences. I would like some feedback on whether
they're significant enough to warrant fixing.

I've tried to mimic the current behaviour as closely as possible, including
keeping underscores for shopt names and hyphens for set -o names, and
limiting the display from “set -o” to the same old list of options.

However I've made a conscious choice not to apply the corresponding limit
to “shopt”, intending to promote the use of “shopt” as the “normal” command
to use for all options. This increases the list displayed by “shopt” by
about 50%.

Adding new options to shopt can happen in any version of Bash, so it seems
to me like it *shouldn't* matter, but have I missed anything?

I've also widened the column format because many of the names are longer
than 15 bytes, and the current list is looking decidedly untidy as a result.

I've tried to keep the current division of options when *populating*
BASHOPTS and SHELLOPTS, but I haven't included a check to ignore (or
complain about) options that are in the “wrong” variable when *reading*
them at startup. Does it matter if options are honoured even when they're
in the wrong one out of BASHOPTS and SHELLOPTS? Are there any security
implications?

Similarly the command line options -o and -O become interchangeable, except
for their order of evaluation. Does the deferred processing of -O

Lastly, the current order for “$-” seems to be “abefhikmptuvxBCEHIPTcs”,
which is *almost* all lower-case then all upper-case, but not quite. In my
version of Bash the options are simply enumerated in raw ASCII order
(upper-case first). Does maintaining the current order matter?

-Martin

PS: I've avoided using a static list to denote the preferred order, because
the list of *possible *options is no longer fixed at compile time: it can
be affected by loadables.

PS2: in the current version of Bash, BASHOPTS can contain
‘interactive_comments’ and SHELLOPTS can contain ‘interactive-comments’.
Does this duplication serve any useful purpose?


reply via email to

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