1*63d4e48fSSadaf Ebrahimi# shFlags 1.2.2 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 a minor bug fix release. 13*63d4e48fSSadaf Ebrahimi 14*63d4e48fSSadaf EbrahimiPlease see the `CHANGES-1.2.md` file for a complete list of changes. 15*63d4e48fSSadaf Ebrahimi 16*63d4e48fSSadaf Ebrahimi### Notable changes 17*63d4e48fSSadaf Ebrahimi 18*63d4e48fSSadaf EbrahimiContinuous integration testing setup with [Travis CI][travis-ci]. This helps 19*63d4e48fSSadaf Ebrahimikeep the code in a working state by executing the unit tests on every submit. 20*63d4e48fSSadaf Ebrahimi 21*63d4e48fSSadaf Ebrahimi[travis-ci]: https://travis-ci.org/kward/shflags 22*63d4e48fSSadaf Ebrahimi 23*63d4e48fSSadaf EbrahimiAll code run through [ShellCheck](http://www.shellcheck.net/). This is an 24*63d4e48fSSadaf Ebrahimiexcellent shell linter, and brings consistency to the coding patterns used. 25*63d4e48fSSadaf Ebrahimi 26*63d4e48fSSadaf EbrahimiThe code was restructured to be more GitHub friendly. It should make the code 27*63d4e48fSSadaf Ebrahimimore appealing to a wider audience. 28*63d4e48fSSadaf Ebrahimi 29*63d4e48fSSadaf Ebrahimi### Notable bug fixes 30*63d4e48fSSadaf Ebrahimi 31*63d4e48fSSadaf EbrahimiFixed issue #45. Empty help string causes `shflags_test_issue_28.sh` to fail. 32*63d4e48fSSadaf Ebrahimi 33*63d4e48fSSadaf Ebrahimi## General info 34*63d4e48fSSadaf Ebrahimi 35*63d4e48fSSadaf Ebrahimi### The unit tests 36*63d4e48fSSadaf Ebrahimi 37*63d4e48fSSadaf EbrahimishFlags is designed to work on as many environments as possible, but not all 38*63d4e48fSSadaf Ebrahimienvironments are created equal. As such, not all of the unit tests will succeed 39*63d4e48fSSadaf Ebrahimion every platform. The unit tests are therefore designed to fail, indicating to 40*63d4e48fSSadaf Ebrahimithe tester that the supported functionality is not present, but an additional 41*63d4e48fSSadaf Ebrahimitest is present to verify that shFlags properly caught the limitation and 42*63d4e48fSSadaf Ebrahimipresented the user with an appropriate error message. 43*63d4e48fSSadaf Ebrahimi 44*63d4e48fSSadaf EbrahimishFlags tries to support both the standard and enhanced versions of `getopt`. As 45*63d4e48fSSadaf Ebrahimieach responds differently, and not everything is supported on the standard 46*63d4e48fSSadaf Ebrahimiversion, some unit tests will be skipped (i.e. ASSERTS will not be thrown) when 47*63d4e48fSSadaf Ebrahimithe standard version of `getopt` is detected. The reason being that there is no 48*63d4e48fSSadaf Ebrahimipoint testing for functionality that is positively known not to exist. A tally 49*63d4e48fSSadaf Ebrahimiof skipped tests will be kept for later reference. 50*63d4e48fSSadaf Ebrahimi 51*63d4e48fSSadaf Ebrahimi### Standard vs Enhanced getopt 52*63d4e48fSSadaf Ebrahimi 53*63d4e48fSSadaf EbrahimiHere is a matrix of the supported features of the various `getopt` variants. 54*63d4e48fSSadaf Ebrahimi 55*63d4e48fSSadaf EbrahimiFeature | std | enh 56*63d4e48fSSadaf Ebrahimi--------------------------------------- | --- | --- 57*63d4e48fSSadaf Ebrahimishort option names | Y | Y 58*63d4e48fSSadaf Ebrahimilong option names | N | Y 59*63d4e48fSSadaf Ebrahimispaces in string options | N | Y 60*63d4e48fSSadaf Ebrahimiintermixing of flag and non-flag values | N | Y 61*63d4e48fSSadaf Ebrahimi 62*63d4e48fSSadaf Ebrahimi## Known Issues 63*63d4e48fSSadaf Ebrahimi 64*63d4e48fSSadaf EbrahimiThe `getopt` version provided by default with all versions of Mac OS X (up to 65*63d4e48fSSadaf Ebrahimiand including 10.13.0) and Solaris (up to and including Solaris 10 and 66*63d4e48fSSadaf EbrahimiOpenSolaris) is the standard version. 67*63d4e48fSSadaf Ebrahimi 68*63d4e48fSSadaf Ebrahimi## Workarounds 69*63d4e48fSSadaf Ebrahimi 70*63d4e48fSSadaf EbrahimiThe Zsh shell requires the `shwordsplit` option to be set and the special 71*63d4e48fSSadaf Ebrahimi`FLAGS_PARENT` variable must be defined. See `src/shflags_test_helpers` to see 72*63d4e48fSSadaf Ebrahimihow the unit tests do this. 73