xref: /aosp_15_r20/external/shflags/doc/RELEASE_NOTES-1.3.0.md (revision 63d4e48fb639f6414be0db9d718e3be2667e4fed)
1# shFlags 1.3.0 Release Notes
2
3https://github.com/kward/shflags
4
5## Preface
6
7This document covers any known issues and workarounds for the stated release of
8shFlags.
9
10## Release info
11
12This is the first release in the new testing series. The primary change from
131.2.3 was reworking things so that 'set -e' is supported.
14
15Please see the `CHANGES-1.3.md` file for a complete list of changes.
16
17### Notable changes
18
19The obsolete `FLAGS_ARGC` variable was removed.
20
21### Notable bug fixes
22
23Some rewrites to ensure shell 'set -e' (as well as 'set -u' and
24'set -o pipefail') are supported as expected.
25
26## General info
27
28### The unit tests
29
30shFlags is designed to work on as many environments as possible, but not all
31environments are created equal. As such, not all of the unit tests will succeed
32on every platform. The unit tests are therefore designed to fail, indicating to
33the tester that the supported functionality is not present, but an additional
34test is present to verify that shFlags properly caught the limitation and
35presented the user with an appropriate error message.
36
37shFlags tries to support both the standard and enhanced versions of `getopt`. As
38each responds differently, and not everything is supported on the standard
39version, some unit tests will be skipped (i.e. ASSERTS will not be thrown) when
40the standard version of `getopt` is detected. The reason being that there is no
41point testing for functionality that is positively known not to exist. A tally
42of skipped tests will be kept for later reference.
43
44### Standard vs Enhanced getopt
45
46Here is a matrix of the supported features of the various `getopt` variants.
47
48Feature                                 | std | enh
49--------------------------------------- | --- | ---
50short option names                      | Y   | Y
51long option names                       | N   | Y
52spaces in string options                | N   | Y
53intermixing of flag and non-flag values | N   | Y
54
55## Known Issues
56
57The `getopt` version provided by default with all versions of Mac OS X (up to
58and including 10.13.0) and Solaris (up to and including Solaris 10 and
59OpenSolaris) is the standard version.
60
61## Workarounds
62
63The Zsh shell requires the `shwordsplit` option to be set and the special
64`FLAGS_PARENT` variable must be defined. See `src/shflags_test_helpers` to see
65how the unit tests do this.
66