xref: /aosp_15_r20/external/shflags/doc/RELEASE_NOTES-1.2.1.md (revision 63d4e48fb639f6414be0db9d718e3be2667e4fed)
1*63d4e48fSSadaf Ebrahimi# shFlags 1.2.1 Release Notes
2*63d4e48fSSadaf Ebrahimi
3*63d4e48fSSadaf Ebrahimihttps://github.com/kward/shflags
4*63d4e48fSSadaf Ebrahimi
5*63d4e48fSSadaf Ebrahimi## Preface
6*63d4e48fSSadaf Ebrahimi
7*63d4e48fSSadaf EbrahimiThis document covers any known issues and workarounds for the stated release of
8*63d4e48fSSadaf EbrahimishFlags.
9*63d4e48fSSadaf Ebrahimi
10*63d4e48fSSadaf Ebrahimi
11*63d4e48fSSadaf Ebrahimi## Release info
12*63d4e48fSSadaf Ebrahimi
13*63d4e48fSSadaf EbrahimiThis is a minor bug fix release.
14*63d4e48fSSadaf Ebrahimi
15*63d4e48fSSadaf EbrahimiPlease see the `CHANGES-1.2.md` file for a complete list of changes.
16*63d4e48fSSadaf Ebrahimi
17*63d4e48fSSadaf Ebrahimi### Notable changes
18*63d4e48fSSadaf Ebrahimi
19*63d4e48fSSadaf EbrahimiSupport for the BusyBox `ash` shell was added.
20*63d4e48fSSadaf Ebrahimi
21*63d4e48fSSadaf Ebrahimi### Notable bug fixes
22*63d4e48fSSadaf Ebrahimi
23*63d4e48fSSadaf EbrahimiFixed issue #28. DEFINE_boolean misbehaves when help-string is empty.
24*63d4e48fSSadaf Ebrahimi
25*63d4e48fSSadaf Ebrahimi
26*63d4e48fSSadaf Ebrahimi## General info
27*63d4e48fSSadaf Ebrahimi
28*63d4e48fSSadaf Ebrahimi### The unit tests
29*63d4e48fSSadaf Ebrahimi
30*63d4e48fSSadaf EbrahimishFlags is designed to work on as many environments as possible, but not all
31*63d4e48fSSadaf Ebrahimienvironments are created equal. As such, not all of the unit tests will succeed
32*63d4e48fSSadaf Ebrahimion every platform. The unit tests are therefore designed to fail, indicating to
33*63d4e48fSSadaf Ebrahimithe tester that the supported functionality is not present, but an additional
34*63d4e48fSSadaf Ebrahimitest is present to verify that shFlags properly caught the limitation and
35*63d4e48fSSadaf Ebrahimipresented the user with an appropriate error message.
36*63d4e48fSSadaf Ebrahimi
37*63d4e48fSSadaf EbrahimishFlags tries to support both the standard and enhanced versions of `getopt`.
38*63d4e48fSSadaf EbrahimiAs each responds differently, and not everything is supported on the standard
39*63d4e48fSSadaf Ebrahimiversion, some unit tests will be skipped (i.e. ASSERTS will not be thrown) when
40*63d4e48fSSadaf Ebrahimithe standard version of `getopt` is detected. The reason being that there is
41*63d4e48fSSadaf Ebrahimino point testing for functionality that is positively known not to exist. A
42*63d4e48fSSadaf Ebrahimitally of skipped tests will be kept for later reference.
43*63d4e48fSSadaf Ebrahimi
44*63d4e48fSSadaf Ebrahimi### Standard vs Enhanced getopt
45*63d4e48fSSadaf Ebrahimi
46*63d4e48fSSadaf EbrahimiHere is a matrix of the supported features of the various `getopt` variants.
47*63d4e48fSSadaf Ebrahimi
48*63d4e48fSSadaf Ebrahimi| Feature                                 | std | enh |
49*63d4e48fSSadaf Ebrahimi|-----------------------------------------|-----|-----|
50*63d4e48fSSadaf Ebrahimi| short option names                      |  Y  |  Y  |
51*63d4e48fSSadaf Ebrahimi| long option names                       |  N  |  Y  |
52*63d4e48fSSadaf Ebrahimi| spaces in string options                |  N  |  Y  |
53*63d4e48fSSadaf Ebrahimi| intermixing of flag and non-flag values |  N  |  Y  |
54*63d4e48fSSadaf Ebrahimi
55*63d4e48fSSadaf Ebrahimi
56*63d4e48fSSadaf Ebrahimi## Known Issues
57*63d4e48fSSadaf Ebrahimi
58*63d4e48fSSadaf EbrahimiThe `getopt` version provided by default with all versions of Mac OS X (up to
59*63d4e48fSSadaf Ebrahimiand including 10.10.2) and Solaris (up to and including Solaris 10 and
60*63d4e48fSSadaf EbrahimiOpenSolaris) is the standard version.
61*63d4e48fSSadaf Ebrahimi
62*63d4e48fSSadaf Ebrahimi## Workarounds
63*63d4e48fSSadaf Ebrahimi
64*63d4e48fSSadaf EbrahimiThe Zsh shell requires the `shwordsplit` option to be set and the special
65*63d4e48fSSadaf Ebrahimi`FLAGS_PARENT` variable must be defined. See `src/shflags_test_helpers` to
66*63d4e48fSSadaf Ebrahimisee how the unit tests do this.
67