kate.ward | 90fd99d | 2008-06-18 20:51:29 +0000 | [diff] [blame] | 1 | Changes in shFlags 1.0.x |
| 2 | ======================== |
| 3 | |
kate.ward | 9a183b8 | 2010-03-18 00:25:34 +0000 | [diff] [blame] | 4 | Changes with 1.0.4 |
| 5 | ------------------ |
| 6 | |
kate.ward | 1cb7960 | 2011-06-10 11:15:49 +0000 | [diff] [blame] | 7 | Fixed issue #10. Usage of ``expr`` under FreeBSD 7.2 (FreeNAS 0.7.1) and FreeBSD |
kate.ward | 929261f | 2010-03-28 23:12:17 +0000 | [diff] [blame] | 8 | 8.0 that was causing many unit tests to fail. |
| 9 | |
| 10 | Fixed issue where booleans were sometimes mis-configured to require additional |
| 11 | values like other flags. |
kate.ward | 9a183b8 | 2010-03-18 00:25:34 +0000 | [diff] [blame] | 12 | |
kate.ward | 1cb7960 | 2011-06-10 11:15:49 +0000 | [diff] [blame] | 13 | Changed _flags_fatal() to exit with FLAGS_ERROR immediately. |
| 14 | |
| 15 | Fixed issue #11. When help is requested, the help flag is no longer prefixed |
| 16 | with [no]. |
| 17 | |
| 18 | Upgraded shUnit2 to 2.1.6. |
| 19 | |
| 20 | Fixed issue #12. Requesting help shouldn't be considered an error. |
| 21 | |
| 22 | Added the ability to override the use of the OS default 'getopt' command by |
| 23 | defining the FLAGS_GETOPT_CMD variable. |
| 24 | |
kate.ward | e7ed70c | 2011-06-10 11:45:17 +0000 | [diff] [blame] | 25 | Updated gen_test_results.sh and versions from shUnit2 source. |
| 26 | |
kate.ward | da8d2c0 | 2011-06-28 13:26:02 +0000 | [diff] [blame^] | 27 | Fixed issues# 13, 14. Added support for dashes ('-') in long flag names. The |
| 28 | defined flag will still be declared with underscores ('_') due to shell |
| 29 | limitations, so only one of a dashed flag name or an underscored flag name are |
| 30 | allowed, not both. |
kate.ward | 9a183b8 | 2010-03-18 00:25:34 +0000 | [diff] [blame] | 31 | |
kate.ward | c521068 | 2009-03-30 18:54:36 +0000 | [diff] [blame] | 32 | Changes with 1.0.3 |
| 33 | ------------------ |
| 34 | |
kate.ward | 812aeae | 2009-04-01 02:49:51 +0000 | [diff] [blame] | 35 | MAJOR CHANGE! ``FLAGS_ARGC`` is now obsolete, and is replaced by |
kate.ward | 39913d1 | 2009-04-01 14:09:23 +0000 | [diff] [blame] | 36 | ``FLAGS_ARGV``. See below for more info. |
kate.ward | c521068 | 2009-03-30 18:54:36 +0000 | [diff] [blame] | 37 | |
| 38 | Fixed issue# 7 where long flags defined with '=' (e.g. --abc=123) made it |
| 39 | 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] | 40 | available because the value returned by ``FLAGS_ARGC`` was wrong. The |
| 41 | ``FLAGS_ARGC`` value is now obsolete, but will be maintained for backwards |
| 42 | compatibility. The new method of getting the non-flag arguments is by executing |
| 43 | ``eval set -- "${FLAGS_ARGV}"`` after the **FLAGS** call. The arguments will |
| 44 | then be available using the standard shell $#, $@, $*, $1, etc. variables. |
kate.ward | c521068 | 2009-03-30 18:54:36 +0000 | [diff] [blame] | 45 | |
| 46 | Due to above fix for issue# 7, there is now proper support for mixing flags |
| 47 | with non-flag arguments on the command-line. Previously, all non-flag arguments |
| 48 | had to be at the end of the command-line. |
| 49 | |
kate.ward | 812aeae | 2009-04-01 02:49:51 +0000 | [diff] [blame] | 50 | Renamed ``_flags_standardGetopt()`` and ``_flags_enhancedGetopt()`` functions to |
| 51 | ``_flags_getoptStandard()`` and ``_flags_getoptEnhanced()``. |
kate.ward | c521068 | 2009-03-30 18:54:36 +0000 | [diff] [blame] | 52 | |
| 53 | Took out the setting and restoration of the '-u' shell flag to treat unset |
| 54 | variables as an error. No point in having it in this library as it is verified |
| 55 | in the unit tests, and provides basically no benefit. |
| 56 | |
kate.ward | bda3917 | 2009-04-01 03:30:22 +0000 | [diff] [blame] | 57 | Fixed bug under Solaris where the generated help was adding extra 'x' |
| 58 | characters. |
| 59 | |
kate.ward | 39913d1 | 2009-04-01 14:09:23 +0000 | [diff] [blame] | 60 | Added checks for reserved flag variables (e.g. FLAGS_TRUE). |
| 61 | |
kate.ward | 4fdd0c8 | 2009-04-24 00:12:43 +0000 | [diff] [blame] | 62 | Fixed some unset variable bugs. |
| 63 | |
| 64 | Now report the actual getopt error if there is one. |
| 65 | |
| 66 | All tests now properly enable skipping based on whether a standard or enhanced |
| 67 | getopt is found. |
| 68 | |
kate.ward | 300c36b | 2009-04-25 12:19:31 +0000 | [diff] [blame] | 69 | Added the OS version to OS release for Solaris. |
| 70 | |
kate.ward | cecd7bd | 2009-05-10 17:56:13 +0000 | [diff] [blame] | 71 | Fixed flags_reset() so it unsets the default value environment vars. |
| 72 | |
kate.ward | c521068 | 2009-03-30 18:54:36 +0000 | [diff] [blame] | 73 | |
kate.ward | 4d8e047 | 2008-07-18 11:52:56 +0000 | [diff] [blame] | 74 | Changes with 1.0.2 |
| 75 | ------------------ |
| 76 | |
| 77 | FLAGS_PARENT no longer transforms into a constant so that it can be defined at |
| 78 | run time in scripts. |
| 79 | |
kate.ward | b7fa8d6 | 2008-08-28 21:18:21 +0000 | [diff] [blame] | 80 | Added warning about short flags being unsupported when there are problems |
kate.ward | 1469dda | 2008-11-17 17:56:43 +0000 | [diff] [blame] | 81 | parsing the options with **getopt**. |
kate.ward | b7fa8d6 | 2008-08-28 21:18:21 +0000 | [diff] [blame] | 82 | |
kate.ward | 437639d | 2008-10-19 17:21:41 +0000 | [diff] [blame] | 83 | Add default values to end of description strings. |
| 84 | |
| 85 | Fixed bug that returned an error instead of success when recalling the default |
| 86 | values for empty strings. |
| 87 | |
kate.ward | 20d0678 | 2008-10-21 19:57:19 +0000 | [diff] [blame] | 88 | Added warning when a duplicate flag definition is attempted. |
| 89 | |
kate.ward | 1469dda | 2008-11-17 17:56:43 +0000 | [diff] [blame] | 90 | Improved ``assert[Warn|Error]Msg()`` test helper grepping. |
kate.ward | 20d0678 | 2008-10-21 19:57:19 +0000 | [diff] [blame] | 91 | |
kate.ward | 2f3cad9 | 2008-10-21 23:29:23 +0000 | [diff] [blame] | 92 | Replaced shell_versions.sh with a new versions library and created |
kate.ward | 1469dda | 2008-11-17 17:56:43 +0000 | [diff] [blame] | 93 | **gen_test_results.sh** to make releases easier. |
kate.ward | 2f3cad9 | 2008-10-21 23:29:23 +0000 | [diff] [blame] | 94 | |
kate.ward | d99166b | 2008-11-12 20:15:39 +0000 | [diff] [blame] | 95 | Copied the coding standards from shUnit2, but haven't fully implemented them |
| 96 | in shFlags yet. |
| 97 | |
kate.ward | 5b48fc1 | 2008-11-13 00:42:43 +0000 | [diff] [blame] | 98 | Issue# 1: When a user defines their own --help flag, no more warning is thrown |
| 99 | when FLAGS() is called stating that the help flag already defined. |
| 100 | |
| 101 | Issue# 2: Passing the --nohelp option no longer gives help output. |
kate.ward | abae05d | 2008-11-12 22:37:05 +0000 | [diff] [blame] | 102 | |
kate.ward | 1469dda | 2008-11-17 17:56:43 +0000 | [diff] [blame] | 103 | Issue# 3: Added support for screen width detection. |
kate.ward | dadc164 | 2008-11-14 02:00:29 +0000 | [diff] [blame] | 104 | |
kate.ward | 4d8e047 | 2008-07-18 11:52:56 +0000 | [diff] [blame] | 105 | |
kate.ward | dc10fe9 | 2008-07-10 19:37:16 +0000 | [diff] [blame] | 106 | Changes with 1.0.1 |
| 107 | ------------------ |
| 108 | |
| 109 | Fixed bug where the help output added [no] to all flag names |
| 110 | |
kate.ward | d3d3d08 | 2008-07-10 20:00:42 +0000 | [diff] [blame] | 111 | Added additional example files that are referenced by the documentation. |
| 112 | |
kate.ward | 1d0ecc4 | 2008-07-11 15:33:23 +0000 | [diff] [blame] | 113 | Improved zsh version and option checking. |
| 114 | |
| 115 | Upgraded shUnit2 to 2.1.4 |
| 116 | |
| 117 | Added unit testing for the help output. |
| 118 | |
kate.ward | f08c5b6 | 2008-07-11 20:32:11 +0000 | [diff] [blame] | 119 | When including a library (e.g. shflags) in a script, zsh 3.0.8 doesn't actually |
| 120 | execute the code in-line, but later. As such, variables that are defined in the |
| 121 | library cannot be used until functions are called from the main code. This |
| 122 | required the 'help' flag definition to be moved inside the FLAGS command. |
| 123 | |
kate.ward | dc10fe9 | 2008-07-10 19:37:16 +0000 | [diff] [blame] | 124 | |
kate.ward | 90fd99d | 2008-06-18 20:51:29 +0000 | [diff] [blame] | 125 | Changes with 1.0.0 |
| 126 | ------------------ |
| 127 | |
| 128 | This is the first official release, so everything is new. |
kate.ward | abae05d | 2008-11-12 22:37:05 +0000 | [diff] [blame] | 129 | |
| 130 | |
kate.ward | 1469dda | 2008-11-17 17:56:43 +0000 | [diff] [blame] | 131 | .. vim:fileencoding=latin1:ft=rst:spell:tw=80 |
kate.ward | abae05d | 2008-11-12 22:37:05 +0000 | [diff] [blame] | 132 | .. $Id$ |