You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

336 lines
11 KiB

  1. # Change Log
  2. **ATTN**: This project uses [semantic versioning](http://semver.org/).
  3. ## [Unreleased]
  4. ### Added
  5. - Flag type code generation via `go generate`
  6. - Write to stderr and exit 1 if action returns non-nil error
  7. - Added support for TOML to the `altsrc` loader
  8. ### Changed
  9. - Raise minimum tested/supported Go version to 1.2+
  10. ## [1.18.0] - 2016-06-27
  11. ### Added
  12. - `./runtests` test runner with coverage tracking by default
  13. - testing on OS X
  14. - testing on Windows
  15. - `UintFlag`, `Uint64Flag`, and `Int64Flag` types and supporting code
  16. ### Changed
  17. - Use spaces for alignment in help/usage output instead of tabs, making the
  18. output alignment consistent regardless of tab width
  19. ### Fixed
  20. - Printing of command aliases in help text
  21. - Printing of visible flags for both struct and struct pointer flags
  22. - Display the `help` subcommand when using `CommandCategories`
  23. - No longer swallows `panic`s that occur within the `Action`s themselves when
  24. detecting the signature of the `Action` field
  25. ## [1.17.0] - 2016-05-09
  26. ### Added
  27. - Pluggable flag-level help text rendering via `cli.DefaultFlagStringFunc`
  28. - `context.GlobalBoolT` was added as an analogue to `context.GlobalBool`
  29. - Support for hiding commands by setting `Hidden: true` -- this will hide the
  30. commands in help output
  31. ### Changed
  32. - `Float64Flag`, `IntFlag`, and `DurationFlag` default values are no longer
  33. quoted in help text output.
  34. - All flag types now include `(default: {value})` strings following usage when a
  35. default value can be (reasonably) detected.
  36. - `IntSliceFlag` and `StringSliceFlag` usage strings are now more consistent
  37. with non-slice flag types
  38. - Apps now exit with a code of 3 if an unknown subcommand is specified
  39. (previously they printed "No help topic for...", but still exited 0. This
  40. makes it easier to script around apps built using `cli` since they can trust
  41. that a 0 exit code indicated a successful execution.
  42. - cleanups based on [Go Report Card
  43. feedback](https://goreportcard.com/report/github.com/urfave/cli)
  44. ## [1.16.0] - 2016-05-02
  45. ### Added
  46. - `Hidden` field on all flag struct types to omit from generated help text
  47. ### Changed
  48. - `BashCompletionFlag` (`--enable-bash-completion`) is now omitted from
  49. generated help text via the `Hidden` field
  50. ### Fixed
  51. - handling of error values in `HandleAction` and `HandleExitCoder`
  52. ## [1.15.0] - 2016-04-30
  53. ### Added
  54. - This file!
  55. - Support for placeholders in flag usage strings
  56. - `App.Metadata` map for arbitrary data/state management
  57. - `Set` and `GlobalSet` methods on `*cli.Context` for altering values after
  58. parsing.
  59. - Support for nested lookup of dot-delimited keys in structures loaded from
  60. YAML.
  61. ### Changed
  62. - The `App.Action` and `Command.Action` now prefer a return signature of
  63. `func(*cli.Context) error`, as defined by `cli.ActionFunc`. If a non-nil
  64. `error` is returned, there may be two outcomes:
  65. - If the error fulfills `cli.ExitCoder`, then `os.Exit` will be called
  66. automatically
  67. - Else the error is bubbled up and returned from `App.Run`
  68. - Specifying an `Action` with the legacy return signature of
  69. `func(*cli.Context)` will produce a deprecation message to stderr
  70. - Specifying an `Action` that is not a `func` type will produce a non-zero exit
  71. from `App.Run`
  72. - Specifying an `Action` func that has an invalid (input) signature will
  73. produce a non-zero exit from `App.Run`
  74. ### Deprecated
  75. - <a name="deprecated-cli-app-runandexitonerror"></a>
  76. `cli.App.RunAndExitOnError`, which should now be done by returning an error
  77. that fulfills `cli.ExitCoder` to `cli.App.Run`.
  78. - <a name="deprecated-cli-app-action-signature"></a> the legacy signature for
  79. `cli.App.Action` of `func(*cli.Context)`, which should now have a return
  80. signature of `func(*cli.Context) error`, as defined by `cli.ActionFunc`.
  81. ### Fixed
  82. - Added missing `*cli.Context.GlobalFloat64` method
  83. ## [1.14.0] - 2016-04-03 (backfilled 2016-04-25)
  84. ### Added
  85. - Codebeat badge
  86. - Support for categorization via `CategorizedHelp` and `Categories` on app.
  87. ### Changed
  88. - Use `filepath.Base` instead of `path.Base` in `Name` and `HelpName`.
  89. ### Fixed
  90. - Ensure version is not shown in help text when `HideVersion` set.
  91. ## [1.13.0] - 2016-03-06 (backfilled 2016-04-25)
  92. ### Added
  93. - YAML file input support.
  94. - `NArg` method on context.
  95. ## [1.12.0] - 2016-02-17 (backfilled 2016-04-25)
  96. ### Added
  97. - Custom usage error handling.
  98. - Custom text support in `USAGE` section of help output.
  99. - Improved help messages for empty strings.
  100. - AppVeyor CI configuration.
  101. ### Changed
  102. - Removed `panic` from default help printer func.
  103. - De-duping and optimizations.
  104. ### Fixed
  105. - Correctly handle `Before`/`After` at command level when no subcommands.
  106. - Case of literal `-` argument causing flag reordering.
  107. - Environment variable hints on Windows.
  108. - Docs updates.
  109. ## [1.11.1] - 2015-12-21 (backfilled 2016-04-25)
  110. ### Changed
  111. - Use `path.Base` in `Name` and `HelpName`
  112. - Export `GetName` on flag types.
  113. ### Fixed
  114. - Flag parsing when skipping is enabled.
  115. - Test output cleanup.
  116. - Move completion check to account for empty input case.
  117. ## [1.11.0] - 2015-11-15 (backfilled 2016-04-25)
  118. ### Added
  119. - Destination scan support for flags.
  120. - Testing against `tip` in Travis CI config.
  121. ### Changed
  122. - Go version in Travis CI config.
  123. ### Fixed
  124. - Removed redundant tests.
  125. - Use correct example naming in tests.
  126. ## [1.10.2] - 2015-10-29 (backfilled 2016-04-25)
  127. ### Fixed
  128. - Remove unused var in bash completion.
  129. ## [1.10.1] - 2015-10-21 (backfilled 2016-04-25)
  130. ### Added
  131. - Coverage and reference logos in README.
  132. ### Fixed
  133. - Use specified values in help and version parsing.
  134. - Only display app version and help message once.
  135. ## [1.10.0] - 2015-10-06 (backfilled 2016-04-25)
  136. ### Added
  137. - More tests for existing functionality.
  138. - `ArgsUsage` at app and command level for help text flexibility.
  139. ### Fixed
  140. - Honor `HideHelp` and `HideVersion` in `App.Run`.
  141. - Remove juvenile word from README.
  142. ## [1.9.0] - 2015-09-08 (backfilled 2016-04-25)
  143. ### Added
  144. - `FullName` on command with accompanying help output update.
  145. - Set default `$PROG` in bash completion.
  146. ### Changed
  147. - Docs formatting.
  148. ### Fixed
  149. - Removed self-referential imports in tests.
  150. ## [1.8.0] - 2015-06-30 (backfilled 2016-04-25)
  151. ### Added
  152. - Support for `Copyright` at app level.
  153. - `Parent` func at context level to walk up context lineage.
  154. ### Fixed
  155. - Global flag processing at top level.
  156. ## [1.7.1] - 2015-06-11 (backfilled 2016-04-25)
  157. ### Added
  158. - Aggregate errors from `Before`/`After` funcs.
  159. - Doc comments on flag structs.
  160. - Include non-global flags when checking version and help.
  161. - Travis CI config updates.
  162. ### Fixed
  163. - Ensure slice type flags have non-nil values.
  164. - Collect global flags from the full command hierarchy.
  165. - Docs prose.
  166. ## [1.7.0] - 2015-05-03 (backfilled 2016-04-25)
  167. ### Changed
  168. - `HelpPrinter` signature includes output writer.
  169. ### Fixed
  170. - Specify go 1.1+ in docs.
  171. - Set `Writer` when running command as app.
  172. ## [1.6.0] - 2015-03-23 (backfilled 2016-04-25)
  173. ### Added
  174. - Multiple author support.
  175. - `NumFlags` at context level.
  176. - `Aliases` at command level.
  177. ### Deprecated
  178. - `ShortName` at command level.
  179. ### Fixed
  180. - Subcommand help output.
  181. - Backward compatible support for deprecated `Author` and `Email` fields.
  182. - Docs regarding `Names`/`Aliases`.
  183. ## [1.5.0] - 2015-02-20 (backfilled 2016-04-25)
  184. ### Added
  185. - `After` hook func support at app and command level.
  186. ### Fixed
  187. - Use parsed context when running command as subcommand.
  188. - Docs prose.
  189. ## [1.4.1] - 2015-01-09 (backfilled 2016-04-25)
  190. ### Added
  191. - Support for hiding `-h / --help` flags, but not `help` subcommand.
  192. - Stop flag parsing after `--`.
  193. ### Fixed
  194. - Help text for generic flags to specify single value.
  195. - Use double quotes in output for defaults.
  196. - Use `ParseInt` instead of `ParseUint` for int environment var values.
  197. - Use `0` as base when parsing int environment var values.
  198. ## [1.4.0] - 2014-12-12 (backfilled 2016-04-25)
  199. ### Added
  200. - Support for environment variable lookup "cascade".
  201. - Support for `Stdout` on app for output redirection.
  202. ### Fixed
  203. - Print command help instead of app help in `ShowCommandHelp`.
  204. ## [1.3.1] - 2014-11-13 (backfilled 2016-04-25)
  205. ### Added
  206. - Docs and example code updates.
  207. ### Changed
  208. - Default `-v / --version` flag made optional.
  209. ## [1.3.0] - 2014-08-10 (backfilled 2016-04-25)
  210. ### Added
  211. - `FlagNames` at context level.
  212. - Exposed `VersionPrinter` var for more control over version output.
  213. - Zsh completion hook.
  214. - `AUTHOR` section in default app help template.
  215. - Contribution guidelines.
  216. - `DurationFlag` type.
  217. ## [1.2.0] - 2014-08-02
  218. ### Added
  219. - Support for environment variable defaults on flags plus tests.
  220. ## [1.1.0] - 2014-07-15
  221. ### Added
  222. - Bash completion.
  223. - Optional hiding of built-in help command.
  224. - Optional skipping of flag parsing at command level.
  225. - `Author`, `Email`, and `Compiled` metadata on app.
  226. - `Before` hook func support at app and command level.
  227. - `CommandNotFound` func support at app level.
  228. - Command reference available on context.
  229. - `GenericFlag` type.
  230. - `Float64Flag` type.
  231. - `BoolTFlag` type.
  232. - `IsSet` flag helper on context.
  233. - More flag lookup funcs at context level.
  234. - More tests &amp; docs.
  235. ### Changed
  236. - Help template updates to account for presence/absence of flags.
  237. - Separated subcommand help template.
  238. - Exposed `HelpPrinter` var for more control over help output.
  239. ## [1.0.0] - 2013-11-01
  240. ### Added
  241. - `help` flag in default app flag set and each command flag set.
  242. - Custom handling of argument parsing errors.
  243. - Command lookup by name at app level.
  244. - `StringSliceFlag` type and supporting `StringSlice` type.
  245. - `IntSliceFlag` type and supporting `IntSlice` type.
  246. - Slice type flag lookups by name at context level.
  247. - Export of app and command help functions.
  248. - More tests &amp; docs.
  249. ## 0.1.0 - 2013-07-22
  250. ### Added
  251. - Initial implementation.
  252. [Unreleased]: https://github.com/urfave/cli/compare/v1.18.0...HEAD
  253. [1.18.0]: https://github.com/urfave/cli/compare/v1.17.0...v1.18.0
  254. [1.17.0]: https://github.com/urfave/cli/compare/v1.16.0...v1.17.0
  255. [1.16.0]: https://github.com/urfave/cli/compare/v1.15.0...v1.16.0
  256. [1.15.0]: https://github.com/urfave/cli/compare/v1.14.0...v1.15.0
  257. [1.14.0]: https://github.com/urfave/cli/compare/v1.13.0...v1.14.0
  258. [1.13.0]: https://github.com/urfave/cli/compare/v1.12.0...v1.13.0
  259. [1.12.0]: https://github.com/urfave/cli/compare/v1.11.1...v1.12.0
  260. [1.11.1]: https://github.com/urfave/cli/compare/v1.11.0...v1.11.1
  261. [1.11.0]: https://github.com/urfave/cli/compare/v1.10.2...v1.11.0
  262. [1.10.2]: https://github.com/urfave/cli/compare/v1.10.1...v1.10.2
  263. [1.10.1]: https://github.com/urfave/cli/compare/v1.10.0...v1.10.1
  264. [1.10.0]: https://github.com/urfave/cli/compare/v1.9.0...v1.10.0
  265. [1.9.0]: https://github.com/urfave/cli/compare/v1.8.0...v1.9.0
  266. [1.8.0]: https://github.com/urfave/cli/compare/v1.7.1...v1.8.0
  267. [1.7.1]: https://github.com/urfave/cli/compare/v1.7.0...v1.7.1
  268. [1.7.0]: https://github.com/urfave/cli/compare/v1.6.0...v1.7.0
  269. [1.6.0]: https://github.com/urfave/cli/compare/v1.5.0...v1.6.0
  270. [1.5.0]: https://github.com/urfave/cli/compare/v1.4.1...v1.5.0
  271. [1.4.1]: https://github.com/urfave/cli/compare/v1.4.0...v1.4.1
  272. [1.4.0]: https://github.com/urfave/cli/compare/v1.3.1...v1.4.0
  273. [1.3.1]: https://github.com/urfave/cli/compare/v1.3.0...v1.3.1
  274. [1.3.0]: https://github.com/urfave/cli/compare/v1.2.0...v1.3.0
  275. [1.2.0]: https://github.com/urfave/cli/compare/v1.1.0...v1.2.0
  276. [1.1.0]: https://github.com/urfave/cli/compare/v1.0.0...v1.1.0
  277. [1.0.0]: https://github.com/urfave/cli/compare/v0.1.0...v1.0.0