1*63d4e48fSSadaf Ebrahimi# shFlags 1.3.0 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## Release info 11*63d4e48fSSadaf Ebrahimi 12*63d4e48fSSadaf EbrahimiThis is the first release in the new testing series. The primary change from 13*63d4e48fSSadaf Ebrahimi1.2.3 was reworking things so that 'set -e' is supported. 14*63d4e48fSSadaf Ebrahimi 15*63d4e48fSSadaf EbrahimiPlease see the `CHANGES-1.3.md` file for a complete list of changes. 16*63d4e48fSSadaf Ebrahimi 17*63d4e48fSSadaf Ebrahimi### Notable changes 18*63d4e48fSSadaf Ebrahimi 19*63d4e48fSSadaf EbrahimiThe obsolete `FLAGS_ARGC` variable was removed. 20*63d4e48fSSadaf Ebrahimi 21*63d4e48fSSadaf Ebrahimi### Notable bug fixes 22*63d4e48fSSadaf Ebrahimi 23*63d4e48fSSadaf EbrahimiSome rewrites to ensure shell 'set -e' (as well as 'set -u' and 24*63d4e48fSSadaf Ebrahimi'set -o pipefail') are supported as expected. 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`. As 38*63d4e48fSSadaf Ebrahimieach 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 no 41*63d4e48fSSadaf Ebrahimipoint testing for functionality that is positively known not to exist. A tally 42*63d4e48fSSadaf Ebrahimiof 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 EbrahimiFeature | std | enh 49*63d4e48fSSadaf Ebrahimi--------------------------------------- | --- | --- 50*63d4e48fSSadaf Ebrahimishort option names | Y | Y 51*63d4e48fSSadaf Ebrahimilong option names | N | Y 52*63d4e48fSSadaf Ebrahimispaces in string options | N | Y 53*63d4e48fSSadaf Ebrahimiintermixing of flag and non-flag values | N | Y 54*63d4e48fSSadaf Ebrahimi 55*63d4e48fSSadaf Ebrahimi## Known Issues 56*63d4e48fSSadaf Ebrahimi 57*63d4e48fSSadaf EbrahimiThe `getopt` version provided by default with all versions of Mac OS X (up to 58*63d4e48fSSadaf Ebrahimiand including 10.13.0) and Solaris (up to and including Solaris 10 and 59*63d4e48fSSadaf EbrahimiOpenSolaris) is the standard version. 60*63d4e48fSSadaf Ebrahimi 61*63d4e48fSSadaf Ebrahimi## Workarounds 62*63d4e48fSSadaf Ebrahimi 63*63d4e48fSSadaf EbrahimiThe Zsh shell requires the `shwordsplit` option to be set and the special 64*63d4e48fSSadaf Ebrahimi`FLAGS_PARENT` variable must be defined. See `src/shflags_test_helpers` to see 65*63d4e48fSSadaf Ebrahimihow the unit tests do this. 66