Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

CHANGELOG.md 14 KiB

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