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