1# Changes in shFlags 2 3## Changes with 1.2.3 4 5Upgraded shUnit2 to 2.1.7. 6 7Fixed the examples to work again with the new code structure. 8 9Removed `gen_test_report.sh` as it isn't used anymore. 10 11Minor fix for `_flags_underscoreName()` to insure POSIX compliance. 12 13Cleanup of pre-GitHub cruft. 14 15Fixed bug in `_flags_columns()` where `stty size` sometimes gave unexpected 16output, causing the function to not work. 17 18Replaced `test_runner` with upstream from https://github.com/kward/shlib. 19 20## Changes with 1.2.2 21 22Ran all scripts through [ShellCheck](http://www.shellcheck.net/). 23 24Replaced `shflags_test.sh` with `test_runner` from 25https://github.com/kward/shlib. 26 27Fixed issue #45. Empty help string causes `shflags_test_issue_28.sh` to fail. 28 29Continuous integration testing setup with [Travis 30CI](https://travis-ci.org/kward/shflags). 31 32Restructured code to be more GitHub like. 33 34## Changes with 1.2.1 35 36Fixed issue #43. Added support for BusyBox `ash` shell. 37 38Fixed issues #26, #27. Re-factored `_flags_itemInList()` to use built-ins. 39 40Fixed issue #31. Documented newline support in FLAGS_HELP. 41 42Fixed issue #28. DEFINE_boolean misbehaves when help-string is empty. 43 44Fixed issue #25. Fix some typos. 45 46## Changes with 1.2.0 47 48Changed from the LGPL v2.1 license to the Apache v2.0 license so that others can 49include the library or make changes without needing to release the modified 50source code as well. 51 52Moved documentation to Markdown. 53 54Migrated the code to GitHub as http://code.google.com/ is turning down. 55 56Fixed issue #10. Usage of `expr` under FreeBSD 7.2 (FreeNAS 0.7.1) and FreeBSD 578.0 that was causing many unit tests to fail. 58 59Fixed issue where booleans were sometimes mis-configured to require additional 60values like other flags. 61 62Changed `_flags_fatal()` to exit with `FLAGS_ERROR` immediately. 63 64Fixed issue #11. When help is requested, the help flag is no longer prefixed 65with '[no]'. 66 67Upgraded shUnit2 to 2.1.6. 68 69Fixed issue #12. Requesting help shouldn't be considered an error. 70 71Added the ability to override the use of the OS default `getopt` command by 72defining the `FLAGS_GETOPT_CMD` variable. 73 74Updated `gen_test_results.sh` and versions from shUnit2 source. 75 76Fixed issues# 13, 14. Added support for dashes '-' in long flag names. The 77defined flag will still be declared with underscores '\_' due to shell 78limitations, so only one of a dashed flag name or an underscored flag name are 79allowed, not both. (Backslash on \_ to prevent Markdown formatting.) 80 81Issue #20. Updated LGPL v2.1 license from 82http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt. 83 84Issue #15. Use `gexpr` instead of `expr` on BSD variants. 85 86Minor tweaks to make run on FreeBSD 9.1. 87 88Fixed issue in `shflags_test_public.sh` where screens >80 columns were causing a 89test to fail. 90 91Issue #22. Fixed broken testGetFlagInfo() test. 92 93Created alternate `validFloat()` and `validInt()` functions that use shell 94built-ins where possible to increase performance and reduce the usage of the 95`expr` command. 96 97Added separate built-in and `expr` functions for doing math. 98 99## Changes with 1.0.3 100 101MAJOR CHANGE! `FLAGS_ARGC` is now obsolete, and is replaced by `FLAGS_ARGV`. See 102below for more info. 103 104Fixed issue# 7 where long flags defined with '=' (e.g. `--abc=123`) made it 105impossible for the user to know how many non-flag command-line arguments were 106available because the value returned by `FLAGS_ARGC` was wrong. The `FLAGS_ARGC` 107value is now obsolete, but will be maintained for backwards compatibility. The 108new method of getting the non-flag arguments is by executing `eval set -- 109"${FLAGS_ARGV}"` after the `FLAGS` call. The arguments will then be available 110using the standard shell $#, $@, $\*, $1, etc. variables. (Backslash on \* to 111prevent Markdown formatting.) 112 113Due to above fix for issue# 7, there is now proper support for mixing flags with 114non-flag arguments on the command-line. Previously, all non-flag arguments had 115to be at the end of the command-line. 116 117Renamed `_flags_standardGetopt()` and `_flags_enhancedGetopt()` functions to 118`_flags_getoptStandard()` and `_flags_getoptEnhanced()`. 119 120Took out the setting and restoration of the '-u' shell flag to treat unset 121variables as an error. No point in having it in this library as it is verified 122in the unit tests, and provides basically no benefit. 123 124Fixed bug under Solaris where the generated help was adding extra 'x' 125characters. 126 127Added checks for reserved flag variables (e.g. `FLAGS_TRUE`). 128 129Fixed some unset variable bugs. 130 131Now report the actual `getopt` error if there is one. 132 133All tests now properly enable skipping based on whether a standard or enhanced 134`getopt` is found. 135 136Added the OS version to OS release for Solaris. 137 138Fixed `flags_reset()` so it unsets the default value environment vars. 139 140## Changes with 1.0.2 141 142${FLAGS_PARENT} no longer transforms into a constant so that it can be defined 143at run time in scripts. 144 145Added warning about short flags being unsupported when there are problems 146parsing the options with `getopt`. 147 148Add default values to end of description strings. 149 150Fixed bug that returned an error instead of success when recalling the default 151values for empty strings. 152 153Added warning when a duplicate flag definition is attempted. 154 155Improved `assert[Warn|Error]Msg()` test helper grepping. 156 157Replaced shell_versions.sh with a new versions library and created 158`gen_test_results.sh` to make releases easier. 159 160Copied the coding standards from shUnit2, but haven't fully implemented them in 161shFlags yet. 162 163Issue# 1: When a user defines their own `--help` flag, no more warning is thrown 164when `FLAGS()` is called stating that the help flag already defined. 165 166Issue# 2: Passing the `--nohelp` option no longer gives help output. 167 168Issue# 3: Added support for screen width detection. 169 170## Changes with 1.0.1 171 172Fixed bug where the help output added '[no]' to all flag names 173 174Added additional example files that are referenced by the documentation. 175 176Improved `zsh` version and option checking. 177 178Upgraded shUnit2 to 2.1.4 179 180Added unit testing for the help output. 181 182When including a library (e.g. shflags) in a script, zsh 3.0.8 doesn't actually 183execute the code in-line, but later. As such, variables that are defined in the 184library cannot be used until functions are called from the main code. This 185required the 'help' flag definition to be moved inside the FLAGS command. 186 187## Changes with 1.0.0 188 189This is the first official release, so everything is new. 190