| 1 | > :warning: This document is no longer being actively maintained. Please see the |
| 2 | > [releases page](https://github.com/urfave/cli/releases) for all release notes |
| 3 | > and related hypermedia for releases `>= 1.22.5`, `>= 2.3.0`. |
| 4 | |
| 5 | --- |
| 6 | |
| 7 | # Change Log |
| 8 | |
| 9 | **ATTN**: This project uses [semantic versioning](https://semver.org/). |
| 10 | |
| 11 | ## Unreleased - 2.X series |
| 12 | |
| 13 | View [unreleased 2.X] series changes. |
| 14 | |
| 15 | ## [2.2.0] - 2020-03-08 |
| 16 | |
| 17 | These release notes were written for the git hash [d648edd48d89ef3a841b1ec75c2ebbd4de5f748f](https://github.com/urfave/cli/tree/d648edd48d89ef3a841b1ec75c2ebbd4de5f748f) |
| 18 | |
| 19 | ### Fixed |
| 20 | |
| 21 | * Fixed zsh completion scripts in [urfave/cli/pull/1062](https://github.com/urfave/cli/pull/1062) via [@zhsj](https://github.com/zhsj) |
| 22 | * Fixed description of subcommand to be more consistent in [urfave/cli/pull/1054](https://github.com/urfave/cli/pull/1054) via [@itchyny](https://github.com/itchyny) |
| 23 | * Fixed possible runtime panic in slice parsing in [urfave/cli/pull/1049](https://github.com/urfave/cli/pull/1049) via [@saschagrunert](https://github.com/saschagrunert) |
| 24 | * Fixed invalid man page header generation in [urfave/cli/pull/1041](https://github.com/urfave/cli/pull/1041) via [@saschagrunert](https://github.com/saschagrunert) |
| 25 | |
| 26 | ### Changed |
| 27 | |
| 28 | * Improved auto-completion instructions and added example gifs in [urfave/cli/pull/1059](https://github.com/urfave/cli/pull/1059) via @masonj188 |
| 29 | * Removed the author from generated man pages in [urfave/cli/pull/1041](https://github.com/urfave/cli/pull/1041) via [@saschagrunert](https://github.com/saschagrunert) |
| 30 | |
| 31 | ### Added |
| 32 | |
| 33 | * Added destination field to `StringSliceFlag` in [urfave/cli/pull/1078](https://github.com/urfave/cli/pull/1078) via [@davidsbond](https://github.com/davidsbond) |
| 34 | * Added `HideHelpCommand`. While `HideHelp` hides both `help` command and `--help` flag, `HideHelpCommand` only hides `help` command and leave `--help` flag as-is in [urfave/cli/pull/1083](https://github.com/urfave/cli/pull/1083) via [@AkihiroSuda](https://github.com/AkihiroSuda) |
| 35 | * Added timestampFlag docs in [urfave/cli/pull/997](https://github.com/urfave/cli/pull/997) via [@drov0](https://github.com/drov0) |
| 36 | * Added required flags documentation in [urfave/cli/pull/1008](https://github.com/urfave/cli/pull/1008) via @lynncyrin, [@anberns](https://github.com/anberns) |
| 37 | |
| 38 | ## [2.1.1] - 2019-12-24 |
| 39 | |
| 40 | ### Fixed |
| 41 | |
| 42 | * Fixed a `Context` regression introduced in `v2.1.0` in [urfave/cli/pull/1014](https://github.com/urfave/cli/pull/1014) via @lynncyrin |
| 43 | |
| 44 | ## [2.1.0] - 2019-12-24 |
| 45 | |
| 46 | These release notes were written for the git hash [ae84df4cef4a2a6f1a0cb1d41ea0f3af8755e5a8](https://github.com/urfave/cli/tree/ae84df4cef4a2a6f1a0cb1d41ea0f3af8755e5a8) |
| 47 | |
| 48 | ### Fixed |
| 49 | |
| 50 | * Fixed some golint errors in [urfave/cli/pull/988](https://github.com/urfave/cli/pull/988) via [@liamchampton](https://github.com/liamchampton) |
| 51 | * Fixed a panic with flag completion [urfave/cli/pull/946](https://github.com/urfave/cli/pull/946) via [@unRob](https://github.com/unRob) |
| 52 | |
| 53 | ### Changed |
| 54 | |
| 55 | * Changed docs generation to use visible flags in [urfave/cli/pull/999](https://github.com/urfave/cli/pull/999) via [@subpop](https://github.com/subpop) |
| 56 | * Changed `App.Run` to use an optional context for timeouts and cancellation in [urfave/cli/pull/975](https://github.com/urfave/cli/pull/975) via [@marwan-at-work](https://github.com/marwan-at-work) |
| 57 | * Changed version info to be hidden if the user has not defined a version in [urfave/cli/pull/955](https://github.com/urfave/cli/pull/955) via [@asahasrabuddhe](https://github.com/asahasrabuddhe) |
| 58 | * Changed docs generation to take into account multiple authors in [urfave/cli/pull/900](https://github.com/urfave/cli/pull/900) via [@saschagrunert](https://github.com/saschagrunert) |
| 59 | * Changed context to expose a `Value` accessor in [urfave/cli/pull/741](https://github.com/urfave/cli/pull/741) via [@corruptmemory](https://github.com/corruptmemory) |
| 60 | |
| 61 | ### Added |
| 62 | |
| 63 | * Added timestamp flag in [urfave/cli/pull/987](https://github.com/urfave/cli/pull/987) via [@drov0](https://github.com/drov0) |
| 64 | |
| 65 | ## [2.0.0] - 2019-11-17 |
| 66 | |
| 67 | The V2 changes were all shipped in [urfave/cli/pull/892](https://github.com/urfave/cli/pull/892), which was created with the effort of over a dozen participants! They are: |
| 68 | |
| 69 | [@asahasrabuddhe](https://github.com/asahasrabuddhe), [@meatballhat](https://github.com/meatballhat), [@jszwedko](https://github.com/jszwedko), @lynncyrin, [@AudriusButkevicius](https://github.com/AudriusButkevicius), [@saschagrunert](https://github.com/saschagrunert), [@rliebz](https://github.com/rliebz), [@johnweldon](https://github.com/johnweldon), [@nlewo](https://github.com/nlewo), [@grubernaut](https://github.com/grubernaut), [@OneOfOne](https://github.com/OneOfOne), [@VMitov](https://github.com/VMitov), [@cbranch](https://github.com/cbranch), [@marwan-at-work](https://github.com/marwan-at-work), [@uudashr](https://github.com/uudashr), [@bfreis](https://github.com/bfreis) |
| 70 | |
| 71 | ### Added |
| 72 | |
| 73 | - Added `NewStringSlice` and `NewIntSlice` for creating their related types |
| 74 | - Added `Float64SliceFlag` for unmarshaling a list of floats from the user |
| 75 | - Added `Context.Lineage` to get all contexts from current up to global |
| 76 | - Added `Context.LocalFlagNames` to get the flag names from *only* the current context |
| 77 | - Added `BoolFlag.Value` to handle both default-false and default-true |
| 78 | - Added `IsSet` method to the `Flag` interface which allows us to detect whether or not a flag has been set |
| 79 | |
| 80 | ### Changed |
| 81 | |
| 82 | - `Context.FlagNames` now returns all flags in the context lineage |
| 83 | - `Context.IsSet` now considers the full context lineage |
| 84 | |
| 85 | ### Removed |
| 86 | |
| 87 | - Removed the ability to specify `&StringSlice{...string}` or `&IntSlice{...int}`. |
| 88 | - Removed adapter code for deprecated `Action` func signature |
| 89 | - Deprecated `App.Author`, `App.Email`, and `Command.ShortName` fields |
| 90 | - Removed all `Context.Global*` methods, as the non-global versions now traverse up |
| 91 | the context lineage automatically. |
| 92 | - Removed `Context.Parent` method, as this is now available via `Context.Lineage` |
| 93 | - Removed `BoolTFlag` and related code, as this is now available via `BoolFlag.Value` |
| 94 | |
| 95 | ## Unreleased - 1.22.X series |
| 96 | |
| 97 | View [unreleased 1.22.X] series changes. |
| 98 | |
| 99 | ## [1.22.4] - 2020-03-31 |
| 100 | |
| 101 | ### Fixed |
| 102 | |
| 103 | - Fixed a panic with flag completion in [urfave/cli/pull/1101](https://github.com/urfave/cli/pull/1101) via [@unRob](https://github.com/unRob), [@VirrageS](https://github.com/VirrageS) |
| 104 | |
| 105 | ## [1.22.3] - 2020-02-25 |
| 106 | |
| 107 | ### Fixed |
| 108 | |
| 109 | - String flag no longer persists the default value if the flag is explicitly initialized in [urfave/cli/pull/981](https://github.com/urfave/cli/pull/981) via [@asahasrabuddhe](https://github.com/asahasrabuddhe) |
| 110 | - `context.IsSet()` returns `true` or `false` correctly regardless of whether the short name or the full name of the flag is passed to it in [urfave/cli/pull/978](https://github.com/urfave/cli/pull/978) via [@asahasrabuddhe](https://github.com/asahasrabuddhe) |
| 111 | - Hide version if the version is not set by the user in [urfave/cli/pull/954](https://github.com/urfave/cli/pull/954) via [@asahasrabuddhe](https://github.com/asahasrabuddhe) |
| 112 | |
| 113 | ## [1.22.2] - 2019-11-17 |
| 114 | |
| 115 | ### Fixed |
| 116 | |
| 117 | - Fix v1.21.0 pass through regression in [urfave/cli/pull/872](https://github.com/urfave/cli/pull/872) via @lynncyrin |
| 118 | - Fix infinite loop when parsing invalid flags for apps with short option handling in [urfave/cli/pull/911](https://github.com/urfave/cli/pull/911) via [@rliebz](https://github.com/rliebz) |
| 119 | - Fix zsh autocomplete in [urfave/cli/pull/906](https://github.com/urfave/cli/pull/906) via [@gnowxilef](https://github.com/gnowxilef) |
| 120 | - Fix typo in `DocGenerationFlag.TakesValue()` docstring in [urfave/cli/pull/902](https://github.com/urfave/cli/pull/902) via [@benmoose](https://github.com/benmoose) |
| 121 | - Avoid panic for missing flag value in [urfave/cli/pull/893](https://github.com/urfave/cli/pull/893) via [@rliebz](https://github.com/rliebz) |
| 122 | |
| 123 | ### Changed |
| 124 | |
| 125 | - Simplify `HelpPrinter` and `CustomHelpPrinter` behaviors in [urfave/cli/pull/912](https://github.com/urfave/cli/pull/912) via [@rliebz](https://github.com/rliebz) |
| 126 | |
| 127 | ## [1.22.1] - 2019-09-11 |
| 128 | |
| 129 | ### Fixed |
| 130 | |
| 131 | * Hide output of hidden commands on man pages in [urfave/cli/pull/889](https://github.com/urfave/cli/pull/889) via [@crosbymichael](https://github.com/crosbymichael) |
| 132 | * Don't generate fish completion for hidden commands [urfave/cli/pull/891](https://github.com/urfave/cli/pull/891) via [@saschagrunert](https://github.com/saschagrunert) |
| 133 | * Using short flag names for required flags throws an error in [urfave/cli/pull/890](https://github.com/urfave/cli/pull/890) via [@asahasrabuddhe](https://github.com/asahasrabuddhe) |
| 134 | |
| 135 | ### Changed |
| 136 | |
| 137 | * Remove flag code generation logic, legacy python test runner in [urfave/cli/pull/883](https://github.com/urfave/cli/pull/883) via [@asahasrabuddhe](https://github.com/asahasrabuddhe) |
| 138 | * Enable Go Modules support, drop support for `Go 1.10` add support for `Go 1.13` in [urfave/cli/pull/885](https://github.com/urfave/cli/pull/885) via [@asahasrabuddhe](https://github.com/asahasrabuddhe) |
| 139 | |
| 140 | ## [1.22.0] - 2019-09-07 |
| 141 | |
| 142 | ### Fixed |
| 143 | |
| 144 | * Fix Subcommands not falling back to `app.ExitEventHandler` in [urfave/cli/pull/856](https://github.com/urfave/cli/pull/856) via [@FaranIdo](https://github.com/FaranIdo) |
| 145 | |
| 146 | ### Changed |
| 147 | |
| 148 | * Clarify that altsrc supports both TOML and JSON in [urfave/cli/pull/774](https://github.com/urfave/cli/pull/774) via [@whereswaldon](https://github.com/whereswaldon) |
| 149 | * Made the exit code example more clear in [urfave/cli/pull/823](https://github.com/urfave/cli/pull/823) via [@xordspar0](https://github.com/xordspar0) |
| 150 | * Removed the use of python for internal flag generation in [urfave/cli/pull/836](https://github.com/urfave/cli/pull/836) via [@asahasrabuddhe](https://github.com/asahasrabuddhe) |
| 151 | * Changed the supported go versions to `1.10`, `1.11`, `1.12` in [urfave/cli/pull/843](https://github.com/urfave/cli/pull/843) via [@lafriks](https://github.com/lafriks) |
| 152 | * Changed the v1 releases section in the readme in [urfave/cli/pull/862](https://github.com/urfave/cli/pull/862) via [@russoj88](https://github.com/russoj88) |
| 153 | * Cleaned up go modules in [urfave/cli/pull/874](https://github.com/urfave/cli/pull/874) via [@saschagrunert](https://github.com/saschagrunert) |
| 154 | |
| 155 | ### Added |
| 156 | |
| 157 | * Added `UseShortOptionHandling` for combining short flags in [urfave/cli/pull/735](https://github.com/urfave/cli/pull/735) via [@rliebz](https://github.com/rliebz) |
| 158 | * Added support for flags bash completion in [urfave/cli/pull/808](https://github.com/urfave/cli/pull/808) via [@yogeshlonkar](https://github.com/yogeshlonkar) |
| 159 | * Added the `TakesFile` indicator to flag in [urfave/cli/pull/851](https://github.com/urfave/cli/pull/851) via [@saschagrunert](https://github.com/saschagrunert) |
| 160 | * Added fish shell completion support in [urfave/cli/pull/848](https://github.com/urfave/cli/pull/848) via [@saschagrunert](https://github.com/saschagrunert) |
| 161 | |
| 162 | ## [1.21.0] - 2019-08-02 |
| 163 | |
| 164 | ### Fixed |
| 165 | |
| 166 | * Fix using "slice" flag types with `EnvVar` in [urfave/cli/pull/687](https://github.com/urfave/cli/pull/687) via [@joshuarubin](https://github.com/joshuarubin) |
| 167 | * Fix regression of `SkipFlagParsing` behavior in [urfave/cli/pull/697](https://github.com/urfave/cli/pull/697) via [@jszwedko](https://github.com/jszwedko) |
| 168 | * Fix handling `ShortOptions` and `SkipArgReorder` in [urfave/cli/pull/686](https://github.com/urfave/cli/pull/686) via [@baude](https://github.com/baude) |
| 169 | * Fix args reordering when bool flags are present in [urfave/cli/pull/712](https://github.com/urfave/cli/pull/712) via [@windler](https://github.com/windler) |
| 170 | * Fix parsing of short options in [urfave/cli/pull/758](https://github.com/urfave/cli/pull/758) via [@vrothberg](https://github.com/vrothberg) |
| 171 | * Fix unaligned indents for the command help messages in [urfave/cli/pull/806](https://github.com/urfave/cli/pull/806) via [@mingrammer](https://github.com/mingrammer) |
| 172 | |
| 173 | ### Changed |
| 174 | |
| 175 | * Cleaned up help output in [urfave/cli/pull/664](https://github.com/urfave/cli/pull/664) via [@maguro](https://github.com/maguro) |
| 176 | * Remove redundant nil checks in [urfave/cli/pull/773](https://github.com/urfave/cli/pull/773) via [@teresy](https://github.com/teresy) |
| 177 | * Case is now considered when sorting strings in [urfave/cli/pull/676](https://github.com/urfave/cli/pull/676) via [@rliebz](https://github.com/rliebz) |
| 178 | |
| 179 | ### Added |
| 180 | |
| 181 | * Added _"required flags"_ support in [urfave/cli/pull/819](https://github.com/urfave/cli/pull/819) via @lynncyrin |
| 182 | * Backport JSON `InputSource` to v1 in [urfave/cli/pull/598](https://github.com/urfave/cli/pull/598) via [@jszwedko](https://github.com/jszwedko) |
| 183 | * Allow more customization of flag help strings in [urfave/cli/pull/661](https://github.com/urfave/cli/pull/661) via [@rliebz](https://github.com/rliebz) |
| 184 | * Allow custom `ExitError` handler function in [urfave/cli/pull/628](https://github.com/urfave/cli/pull/628) via [@phinnaeus](https://github.com/phinnaeus) |
| 185 | * Allow loading a variable from a file in [urfave/cli/pull/675](https://github.com/urfave/cli/pull/675) via [@jmccann](https://github.com/jmccann) |
| 186 | * Allow combining short bool names in [urfave/cli/pull/684](https://github.com/urfave/cli/pull/684) via [@baude](https://github.com/baude) |
| 187 | * Added test coverage to context in [urfave/cli/pull/788](https://github.com/urfave/cli/pull/788) via [@benzvan](https://github.com/benzvan) |
| 188 | * Added go module support in [urfave/cli/pull/831](https://github.com/urfave/cli/pull/831) via [@saschagrunert](https://github.com/saschagrunert) |
| 189 | |
| 190 | ## [1.20.0] - 2017-08-10 |
| 191 | |
| 192 | ### Fixed |
| 193 | |
| 194 | * `HandleExitCoder` is now correctly iterates over all errors in |
| 195 | a `MultiError`. The exit code is the exit code of the last error or `1` if |
| 196 | there are no `ExitCoder`s in the `MultiError`. |
| 197 | * Fixed YAML file loading on Windows (previously would fail validate the file path) |
| 198 | * Subcommand `Usage`, `Description`, `ArgsUsage`, `OnUsageError` correctly |
| 199 | propagated |
| 200 | * `ErrWriter` is now passed downwards through command structure to avoid the |
| 201 | need to redefine it |
| 202 | * Pass `Command` context into `OnUsageError` rather than parent context so that |
| 203 | all fields are available |
| 204 | * Errors occurring in `Before` funcs are no longer double printed |
| 205 | * Use `UsageText` in the help templates for commands and subcommands if |
| 206 | defined; otherwise build the usage as before (was previously ignoring this |
| 207 | field) |
| 208 | * `IsSet` and `GlobalIsSet` now correctly return whether a flag is set if |
| 209 | a program calls `Set` or `GlobalSet` directly after flag parsing (would |
| 210 | previously only return `true` if the flag was set during parsing) |
| 211 | |
| 212 | ### Changed |
| 213 | |
| 214 | * No longer exit the program on command/subcommand error if the error raised is |
| 215 | not an `OsExiter`. This exiting behavior was introduced in 1.19.0, but was |
| 216 | determined to be a regression in functionality. See [the |
| 217 | PR](https://github.com/urfave/cli/pull/595) for discussion. |
| 218 | |
| 219 | ### Added |
| 220 | |
| 221 | * `CommandsByName` type was added to make it easy to sort `Command`s by name, |
| 222 | alphabetically |
| 223 | * `altsrc` now handles loading of string and int arrays from TOML |
| 224 | * Support for definition of custom help templates for `App` via |
| 225 | `CustomAppHelpTemplate` |
| 226 | * Support for arbitrary key/value fields on `App` to be used with |
| 227 | `CustomAppHelpTemplate` via `ExtraInfo` |
| 228 | * `HelpFlag`, `VersionFlag`, and `BashCompletionFlag` changed to explicitly be |
| 229 | `cli.Flag`s allowing for the use of custom flags satisfying the `cli.Flag` |
| 230 | interface to be used. |
| 231 | |
| 232 | |
| 233 | ## [1.19.1] - 2016-11-21 |
| 234 | |
| 235 | ### Fixed |
| 236 | |
| 237 | - Fixes regression introduced in 1.19.0 where using an `ActionFunc` as |
| 238 | the `Action` for a command would cause it to error rather than calling the |
| 239 | function. Should not have a affected declarative cases using `func(c |
| 240 | *cli.Context) err)`. |
| 241 | - Shell completion now handles the case where the user specifies |
| 242 | `--generate-bash-completion` immediately after a flag that takes an argument. |
| 243 | Previously it call the application with `--generate-bash-completion` as the |
| 244 | flag value. |
| 245 | |
| 246 | ## [1.19.0] - 2016-11-19 |
| 247 | ### Added |
| 248 | - `FlagsByName` was added to make it easy to sort flags (e.g. `sort.Sort(cli.FlagsByName(app.Flags))`) |
| 249 | - A `Description` field was added to `App` for a more detailed description of |
| 250 | the application (similar to the existing `Description` field on `Command`) |
| 251 | - Flag type code generation via `go generate` |
| 252 | - Write to stderr and exit 1 if action returns non-nil error |
| 253 | - Added support for TOML to the `altsrc` loader |
| 254 | - `SkipArgReorder` was added to allow users to skip the argument reordering. |
| 255 | This is useful if you want to consider all "flags" after an argument as |
| 256 | arguments rather than flags (the default behavior of the stdlib `flag` |
| 257 | library). This is backported functionality from the [removal of the flag |
| 258 | reordering](https://github.com/urfave/cli/pull/398) in the unreleased version |
| 259 | 2 |
| 260 | - For formatted errors (those implementing `ErrorFormatter`), the errors will |
| 261 | be formatted during output. Compatible with `pkg/errors`. |
| 262 | |
| 263 | ### Changed |
| 264 | - Raise minimum tested/supported Go version to 1.2+ |
| 265 | |
| 266 | ### Fixed |
| 267 | - Consider empty environment variables as set (previously environment variables |
| 268 | with the equivalent of `""` would be skipped rather than their value used). |
| 269 | - Return an error if the value in a given environment variable cannot be parsed |
| 270 | as the flag type. Previously these errors were silently swallowed. |
| 271 | - Print full error when an invalid flag is specified (which includes the invalid flag) |
| 272 | - `App.Writer` defaults to `stdout` when `nil` |
| 273 | - If no action is specified on a command or app, the help is now printed instead of `panic`ing |
| 274 | - `App.Metadata` is initialized automatically now (previously was `nil` unless initialized) |
| 275 | - Correctly show help message if `-h` is provided to a subcommand |
| 276 | - `context.(Global)IsSet` now respects environment variables. Previously it |
| 277 | would return `false` if a flag was specified in the environment rather than |
| 278 | as an argument |
| 279 | - Removed deprecation warnings to STDERR to avoid them leaking to the end-user |
| 280 | - `altsrc`s import paths were updated to use `gopkg.in/urfave/cli.v1`. This |
| 281 | fixes issues that occurred when `gopkg.in/urfave/cli.v1` was imported as well |
| 282 | as `altsrc` where Go would complain that the types didn't match |
| 283 | |
| 284 | ## [1.18.1] - 2016-08-28 |
| 285 | ### Fixed |
| 286 | - Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported) |
| 287 | |
| 288 | ## [1.18.0] - 2016-06-27 |
| 289 | ### Added |
| 290 | - `./runtests` test runner with coverage tracking by default |
| 291 | - testing on OS X |
| 292 | - testing on Windows |
| 293 | - `UintFlag`, `Uint64Flag`, and `Int64Flag` types and supporting code |
| 294 | |
| 295 | ### Changed |
| 296 | - Use spaces for alignment in help/usage output instead of tabs, making the |
| 297 | output alignment consistent regardless of tab width |
| 298 | |
| 299 | ### Fixed |
| 300 | - Printing of command aliases in help text |
| 301 | - Printing of visible flags for both struct and struct pointer flags |
| 302 | - Display the `help` subcommand when using `CommandCategories` |
| 303 | - No longer swallows `panic`s that occur within the `Action`s themselves when |
| 304 | detecting the signature of the `Action` field |
| 305 | |
| 306 | ## [1.17.1] - 2016-08-28 |
| 307 | ### Fixed |
| 308 | - Removed deprecation warnings to STDERR to avoid them leaking to the end-user |
| 309 | |
| 310 | ## [1.17.0] - 2016-05-09 |
| 311 | ### Added |
| 312 | - Pluggable flag-level help text rendering via `cli.DefaultFlagStringFunc` |
| 313 | - `context.GlobalBoolT` was added as an analogue to `context.GlobalBool` |
| 314 | - Support for hiding commands by setting `Hidden: true` -- this will hide the |
| 315 | commands in help output |
| 316 | |
| 317 | ### Changed |
| 318 | - `Float64Flag`, `IntFlag`, and `DurationFlag` default values are no longer |
| 319 | quoted in help text output. |
| 320 | - All flag types now include `(default: {value})` strings following usage when a |
| 321 | default value can be (reasonably) detected. |
| 322 | - `IntSliceFlag` and `StringSliceFlag` usage strings are now more consistent |
| 323 | with non-slice flag types |
| 324 | - Apps now exit with a code of 3 if an unknown subcommand is specified |
| 325 | (previously they printed "No help topic for...", but still exited 0. This |
| 326 | makes it easier to script around apps built using `cli` since they can trust |
| 327 | that a 0 exit code indicated a successful execution. |
| 328 | - cleanups based on [Go Report Card |
| 329 | feedback](https://goreportcard.com/report/github.com/urfave/cli) |
| 330 | |
| 331 | ## [1.16.1] - 2016-08-28 |
| 332 | ### Fixed |
| 333 | - Removed deprecation warnings to STDERR to avoid them leaking to the end-user |
| 334 | |
| 335 | ## [1.16.0] - 2016-05-02 |
| 336 | ### Added |
| 337 | - `Hidden` field on all flag struct types to omit from generated help text |
| 338 | |
| 339 | ### Changed |
| 340 | - `BashCompletionFlag` (`--enable-bash-completion`) is now omitted from |
| 341 | generated help text via the `Hidden` field |
| 342 | |
| 343 | ### Fixed |
| 344 | - handling of error values in `HandleAction` and `HandleExitCoder` |
| 345 | |
| 346 | ## [1.15.0] - 2016-04-30 |
| 347 | ### Added |
| 348 | - This file! |
| 349 | - Support for placeholders in flag usage strings |
| 350 | - `App.Metadata` map for arbitrary data/state management |
| 351 | - `Set` and `GlobalSet` methods on `*cli.Context` for altering values after |
| 352 | parsing. |
| 353 | - Support for nested lookup of dot-delimited keys in structures loaded from |
| 354 | YAML. |
| 355 | |
| 356 | ### Changed |
| 357 | - The `App.Action` and `Command.Action` now prefer a return signature of |
| 358 | `func(*cli.Context) error`, as defined by `cli.ActionFunc`. If a non-nil |
| 359 | `error` is returned, there may be two outcomes: |
| 360 | - If the error fulfills `cli.ExitCoder`, then `os.Exit` will be called |
| 361 | automatically |
| 362 | - Else the error is bubbled up and returned from `App.Run` |
| 363 | - Specifying an `Action` with the legacy return signature of |
| 364 | `func(*cli.Context)` will produce a deprecation message to stderr |
| 365 | - Specifying an `Action` that is not a `func` type will produce a non-zero exit |
| 366 | from `App.Run` |
| 367 | - Specifying an `Action` func that has an invalid (input) signature will |
| 368 | produce a non-zero exit from `App.Run` |
| 369 | |
| 370 | ### Deprecated |
| 371 | - <a name="deprecated-cli-app-runandexitonerror"></a> |
| 372 | `cli.App.RunAndExitOnError`, which should now be done by returning an error |
| 373 | that fulfills `cli.ExitCoder` to `cli.App.Run`. |
| 374 | - <a name="deprecated-cli-app-action-signature"></a> the legacy signature for |
| 375 | `cli.App.Action` of `func(*cli.Context)`, which should now have a return |
| 376 | signature of `func(*cli.Context) error`, as defined by `cli.ActionFunc`. |
| 377 | |
| 378 | ### Fixed |
| 379 | - Added missing `*cli.Context.GlobalFloat64` method |
| 380 | |
| 381 | ## [1.14.0] - 2016-04-03 (backfilled 2016-04-25) |
| 382 | ### Added |
| 383 | - Codebeat badge |
| 384 | - Support for categorization via `CategorizedHelp` and `Categories` on app. |
| 385 | |
| 386 | ### Changed |
| 387 | - Use `filepath.Base` instead of `path.Base` in `Name` and `HelpName`. |
| 388 | |
| 389 | ### Fixed |
| 390 | - Ensure version is not shown in help text when `HideVersion` set. |
| 391 | |
| 392 | ## [1.13.0] - 2016-03-06 (backfilled 2016-04-25) |
| 393 | ### Added |
| 394 | - YAML file input support. |
| 395 | - `NArg` method on context. |
| 396 | |
| 397 | ## [1.12.0] - 2016-02-17 (backfilled 2016-04-25) |
| 398 | ### Added |
| 399 | - Custom usage error handling. |
| 400 | - Custom text support in `USAGE` section of help output. |
| 401 | - Improved help messages for empty strings. |
| 402 | - AppVeyor CI configuration. |
| 403 | |
| 404 | ### Changed |
| 405 | - Removed `panic` from default help printer func. |
| 406 | - De-duping and optimizations. |
| 407 | |
| 408 | ### Fixed |
| 409 | - Correctly handle `Before`/`After` at command level when no subcommands. |
| 410 | - Case of literal `-` argument causing flag reordering. |
| 411 | - Environment variable hints on Windows. |
| 412 | - Docs updates. |
| 413 | |
| 414 | ## [1.11.1] - 2015-12-21 (backfilled 2016-04-25) |
| 415 | ### Changed |
| 416 | - Use `path.Base` in `Name` and `HelpName` |
| 417 | - Export `GetName` on flag types. |
| 418 | |
| 419 | ### Fixed |
| 420 | - Flag parsing when skipping is enabled. |
| 421 | - Test output cleanup. |
| 422 | - Move completion check to account for empty input case. |
| 423 | |
| 424 | ## [1.11.0] - 2015-11-15 (backfilled 2016-04-25) |
| 425 | ### Added |
| 426 | - Destination scan support for flags. |
| 427 | - Testing against `tip` in Travis CI config. |
| 428 | |
| 429 | ### Changed |
| 430 | - Go version in Travis CI config. |
| 431 | |
| 432 | ### Fixed |
| 433 | - Removed redundant tests. |
| 434 | - Use correct example naming in tests. |
| 435 | |
| 436 | ## [1.10.2] - 2015-10-29 (backfilled 2016-04-25) |
| 437 | ### Fixed |
| 438 | - Remove unused var in bash completion. |
| 439 | |
| 440 | ## [1.10.1] - 2015-10-21 (backfilled 2016-04-25) |
| 441 | ### Added |
| 442 | - Coverage and reference logos in README. |
| 443 | |
| 444 | ### Fixed |
| 445 | - Use specified values in help and version parsing. |
| 446 | - Only display app version and help message once. |
| 447 | |
| 448 | ## [1.10.0] - 2015-10-06 (backfilled 2016-04-25) |
| 449 | ### Added |
| 450 | - More tests for existing functionality. |
| 451 | - `ArgsUsage` at app and command level for help text flexibility. |
| 452 | |
| 453 | ### Fixed |
| 454 | - Honor `HideHelp` and `HideVersion` in `App.Run`. |
| 455 | - Remove juvenile word from README. |
| 456 | |
| 457 | ## [1.9.0] - 2015-09-08 (backfilled 2016-04-25) |
| 458 | ### Added |
| 459 | - `FullName` on command with accompanying help output update. |
| 460 | - Set default `$PROG` in bash completion. |
| 461 | |
| 462 | ### Changed |
| 463 | - Docs formatting. |
| 464 | |
| 465 | ### Fixed |
| 466 | - Removed self-referential imports in tests. |
| 467 | |
| 468 | ## [1.8.0] - 2015-06-30 (backfilled 2016-04-25) |
| 469 | ### Added |
| 470 | - Support for `Copyright` at app level. |
| 471 | - `Parent` func at context level to walk up context lineage. |
| 472 | |
| 473 | ### Fixed |
| 474 | - Global flag processing at top level. |
| 475 | |
| 476 | ## [1.7.1] - 2015-06-11 (backfilled 2016-04-25) |
| 477 | ### Added |
| 478 | - Aggregate errors from `Before`/`After` funcs. |
| 479 | - Doc comments on flag structs. |
| 480 | - Include non-global flags when checking version and help. |
| 481 | - Travis CI config updates. |
| 482 | |
| 483 | ### Fixed |
| 484 | - Ensure slice type flags have non-nil values. |
| 485 | - Collect global flags from the full command hierarchy. |
| 486 | - Docs prose. |
| 487 | |
| 488 | ## [1.7.0] - 2015-05-03 (backfilled 2016-04-25) |
| 489 | ### Changed |
| 490 | - `HelpPrinter` signature includes output writer. |
| 491 | |
| 492 | ### Fixed |
| 493 | - Specify go 1.1+ in docs. |
| 494 | - Set `Writer` when running command as app. |
| 495 | |
| 496 | ## [1.6.0] - 2015-03-23 (backfilled 2016-04-25) |
| 497 | ### Added |
| 498 | - Multiple author support. |
| 499 | - `NumFlags` at context level. |
| 500 | - `Aliases` at command level. |
| 501 | |
| 502 | ### Deprecated |
| 503 | - `ShortName` at command level. |
| 504 | |
| 505 | ### Fixed |
| 506 | - Subcommand help output. |
| 507 | - Backward compatible support for deprecated `Author` and `Email` fields. |
| 508 | - Docs regarding `Names`/`Aliases`. |
| 509 | |
| 510 | ## [1.5.0] - 2015-02-20 (backfilled 2016-04-25) |
| 511 | ### Added |
| 512 | - `After` hook func support at app and command level. |
| 513 | |
| 514 | ### Fixed |
| 515 | - Use parsed context when running command as subcommand. |
| 516 | - Docs prose. |
| 517 | |
| 518 | ## [1.4.1] - 2015-01-09 (backfilled 2016-04-25) |
| 519 | ### Added |
| 520 | - Support for hiding `-h / --help` flags, but not `help` subcommand. |
| 521 | - Stop flag parsing after `--`. |
| 522 | |
| 523 | ### Fixed |
| 524 | - Help text for generic flags to specify single value. |
| 525 | - Use double quotes in output for defaults. |
| 526 | - Use `ParseInt` instead of `ParseUint` for int environment var values. |
| 527 | - Use `0` as base when parsing int environment var values. |
| 528 | |
| 529 | ## [1.4.0] - 2014-12-12 (backfilled 2016-04-25) |
| 530 | ### Added |
| 531 | - Support for environment variable lookup "cascade". |
| 532 | - Support for `Stdout` on app for output redirection. |
| 533 | |
| 534 | ### Fixed |
| 535 | - Print command help instead of app help in `ShowCommandHelp`. |
| 536 | |
| 537 | ## [1.3.1] - 2014-11-13 (backfilled 2016-04-25) |
| 538 | ### Added |
| 539 | - Docs and example code updates. |
| 540 | |
| 541 | ### Changed |
| 542 | - Default `-v / --version` flag made optional. |
| 543 | |
| 544 | ## [1.3.0] - 2014-08-10 (backfilled 2016-04-25) |
| 545 | ### Added |
| 546 | - `FlagNames` at context level. |
| 547 | - Exposed `VersionPrinter` var for more control over version output. |
| 548 | - Zsh completion hook. |
| 549 | - `AUTHOR` section in default app help template. |
| 550 | - Contribution guidelines. |
| 551 | - `DurationFlag` type. |
| 552 | |
| 553 | ## [1.2.0] - 2014-08-02 |
| 554 | ### Added |
| 555 | - Support for environment variable defaults on flags plus tests. |
| 556 | |
| 557 | ## [1.1.0] - 2014-07-15 |
| 558 | ### Added |
| 559 | - Bash completion. |
| 560 | - Optional hiding of built-in help command. |
| 561 | - Optional skipping of flag parsing at command level. |
| 562 | - `Author`, `Email`, and `Compiled` metadata on app. |
| 563 | - `Before` hook func support at app and command level. |
| 564 | - `CommandNotFound` func support at app level. |
| 565 | - Command reference available on context. |
| 566 | - `GenericFlag` type. |
| 567 | - `Float64Flag` type. |
| 568 | - `BoolTFlag` type. |
| 569 | - `IsSet` flag helper on context. |
| 570 | - More flag lookup funcs at context level. |
| 571 | - More tests & docs. |
| 572 | |
| 573 | ### Changed |
| 574 | - Help template updates to account for presence/absence of flags. |
| 575 | - Separated subcommand help template. |
| 576 | - Exposed `HelpPrinter` var for more control over help output. |
| 577 | |
| 578 | ## [1.0.0] - 2013-11-01 |
| 579 | ### Added |
| 580 | - `help` flag in default app flag set and each command flag set. |
| 581 | - Custom handling of argument parsing errors. |
| 582 | - Command lookup by name at app level. |
| 583 | - `StringSliceFlag` type and supporting `StringSlice` type. |
| 584 | - `IntSliceFlag` type and supporting `IntSlice` type. |
| 585 | - Slice type flag lookups by name at context level. |
| 586 | - Export of app and command help functions. |
| 587 | - More tests & docs. |
| 588 | |
| 589 | ## 0.1.0 - 2013-07-22 |
| 590 | ### Added |
| 591 | - Initial implementation. |
| 592 | |
| 593 | [unreleased 2.X]: https://github.com/urfave/cli/compare/v2.2.0...HEAD |
| 594 | [2.2.0]: https://github.com/urfave/cli/compare/v2.1.1...v2.2.0 |
| 595 | [2.1.1]: https://github.com/urfave/cli/compare/v2.1.0...v2.1.1 |
| 596 | [2.1.0]: https://github.com/urfave/cli/compare/v2.0.0...v2.1.0 |
| 597 | [2.0.0]: https://github.com/urfave/cli/compare/v1.22.2...v2.0.0 |
| 598 | |
| 599 | [unreleased 1.22.X]: https://github.com/urfave/cli/compare/v1.22.4...v1-maint |
| 600 | [1.22.4]: https://github.com/urfave/cli/compare/v1.22.3...v1.22.4 |
| 601 | [1.22.3]: https://github.com/urfave/cli/compare/v1.22.2...v1.22.3 |
| 602 | [1.22.2]: https://github.com/urfave/cli/compare/v1.22.1...v1.22.2 |
| 603 | [1.22.1]: https://github.com/urfave/cli/compare/v1.22.0...v1.22.1 |
| 604 | [1.22.0]: https://github.com/urfave/cli/compare/v1.21.0...v1.22.0 |
| 605 | [1.21.0]: https://github.com/urfave/cli/compare/v1.20.0...v1.21.0 |
| 606 | [1.20.0]: https://github.com/urfave/cli/compare/v1.19.1...v1.20.0 |
| 607 | [1.19.1]: https://github.com/urfave/cli/compare/v1.19.0...v1.19.1 |
| 608 | [1.19.0]: https://github.com/urfave/cli/compare/v1.18.0...v1.19.0 |
| 609 | [1.18.0]: https://github.com/urfave/cli/compare/v1.17.0...v1.18.0 |
| 610 | [1.17.0]: https://github.com/urfave/cli/compare/v1.16.0...v1.17.0 |
| 611 | [1.16.0]: https://github.com/urfave/cli/compare/v1.15.0...v1.16.0 |
| 612 | [1.15.0]: https://github.com/urfave/cli/compare/v1.14.0...v1.15.0 |
| 613 | [1.14.0]: https://github.com/urfave/cli/compare/v1.13.0...v1.14.0 |
| 614 | [1.13.0]: https://github.com/urfave/cli/compare/v1.12.0...v1.13.0 |
| 615 | [1.12.0]: https://github.com/urfave/cli/compare/v1.11.1...v1.12.0 |
| 616 | [1.11.1]: https://github.com/urfave/cli/compare/v1.11.0...v1.11.1 |
| 617 | [1.11.0]: https://github.com/urfave/cli/compare/v1.10.2...v1.11.0 |
| 618 | [1.10.2]: https://github.com/urfave/cli/compare/v1.10.1...v1.10.2 |
| 619 | [1.10.1]: https://github.com/urfave/cli/compare/v1.10.0...v1.10.1 |
| 620 | [1.10.0]: https://github.com/urfave/cli/compare/v1.9.0...v1.10.0 |
| 621 | [1.9.0]: https://github.com/urfave/cli/compare/v1.8.0...v1.9.0 |
| 622 | [1.8.0]: https://github.com/urfave/cli/compare/v1.7.1...v1.8.0 |
| 623 | [1.7.1]: https://github.com/urfave/cli/compare/v1.7.0...v1.7.1 |
| 624 | [1.7.0]: https://github.com/urfave/cli/compare/v1.6.0...v1.7.0 |
| 625 | [1.6.0]: https://github.com/urfave/cli/compare/v1.5.0...v1.6.0 |
| 626 | [1.5.0]: https://github.com/urfave/cli/compare/v1.4.1...v1.5.0 |
| 627 | [1.4.1]: https://github.com/urfave/cli/compare/v1.4.0...v1.4.1 |
| 628 | [1.4.0]: https://github.com/urfave/cli/compare/v1.3.1...v1.4.0 |
| 629 | [1.3.1]: https://github.com/urfave/cli/compare/v1.3.0...v1.3.1 |
| 630 | [1.3.0]: https://github.com/urfave/cli/compare/v1.2.0...v1.3.0 |
| 631 | [1.2.0]: https://github.com/urfave/cli/compare/v1.1.0...v1.2.0 |
| 632 | [1.1.0]: https://github.com/urfave/cli/compare/v1.0.0...v1.1.0 |
| 633 | [1.0.0]: https://github.com/urfave/cli/compare/v0.1.0...v1.0.0 |