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