• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Changes in shFlags
2
3## Changes with 1.0.3
4
5MAJOR CHANGE! `FLAGS_ARGC` is now obsolete, and is replaced by `FLAGS_ARGV`. See
6below for more info.
7
8Fixed issue# 7 where long flags defined with '=' (e.g. `--abc=123`) made it
9impossible for the user to know how many non-flag command-line arguments were
10available because the value returned by `FLAGS_ARGC` was wrong. The `FLAGS_ARGC`
11value is now obsolete, but will be maintained for backwards compatibility. The
12new method of getting the non-flag arguments is by executing `eval set --
13"${FLAGS_ARGV}"` after the `FLAGS` call. The arguments will then be available
14using the standard shell $#, $@, $*, $1, etc. variables.
15
16Due to above fix for issue# 7, there is now proper support for mixing flags with
17non-flag arguments on the command-line. Previously, all non-flag arguments had
18to be at the end of the command-line.
19
20Renamed `_flags_standardGetopt()` and `_flags_enhancedGetopt()` functions to
21`_flags_getoptStandard()` and `_flags_getoptEnhanced()`.
22
23Took out the setting and restoration of the '-u' shell flag to treat unset
24variables as an error. No point in having it in this library as it is verified
25in the unit tests, and provides basically no benefit.
26
27Fixed bug under Solaris where the generated help was adding extra 'x'
28characters.
29
30Added checks for reserved flag variables (e.g. `FLAGS_TRUE`).
31
32Fixed some unset variable bugs.
33
34Now report the actual `getopt` error if there is one.
35
36All tests now properly enable skipping based on whether a standard or enhanced
37`getopt` is found.
38
39Added the OS version to OS release for Solaris.
40
41Fixed `flags_reset()` so it unsets the default value environment vars.
42
43## Changes with 1.0.2
44
45FLAGS_PARENT no longer transforms into a constant so that it can be defined at
46run time in scripts.
47
48Added warning about short flags being unsupported when there are problems
49parsing the options with `getopt`.
50
51Add default values to end of description strings.
52
53Fixed bug that returned an error instead of success when recalling the default
54values for empty strings.
55
56Added warning when a duplicate flag definition is attempted.
57
58Improved `assert[Warn|Error]Msg()` test helper grepping.
59
60Replaced shell_versions.sh with a new versions library and created
61`gen_test_results.sh` to make releases easier.
62
63Copied the coding standards from shUnit2, but haven't fully implemented them in
64shFlags yet.
65
66Issue# 1: When a user defines their own `--help` flag, no more warning is thrown
67when `FLAGS()` is called stating that the help flag already defined.
68
69Issue# 2: Passing the `--nohelp` option no longer gives help output.
70
71Issue# 3: Added support for screen width detection.
72
73## Changes with 1.0.1
74
75Fixed bug where the help output added '[no]' to all flag names
76
77Added additional example files that are referenced by the documentation.
78
79Improved `zsh` version and option checking.
80
81Upgraded shUnit2 to 2.1.4
82
83Added unit testing for the help output.
84
85When including a library (e.g. shflags) in a script, zsh 3.0.8 doesn't actually
86execute the code in-line, but later. As such, variables that are defined in the
87library cannot be used until functions are called from the main code. This
88required the 'help' flag definition to be moved inside the FLAGS command.
89
90## Changes with 1.0.0
91
92This is the first official release, so everything is new.
93