Releases: urfave/cli
Releases · urfave/cli
Release 1.22.1
🚧 Watch out! There's a known regression in this release! #850 🚧
Fixed
- Hide output of hidden commands on man pages in urfave/cli/pull/889 via @crosbymichael
- Don't generate fish completion for hidden commands urfave/cli/pull/891 via @saschagrunert
- Using short flag names for required flags throws an error in urfave/cli/pull/890 via @asahasrabuddhe
Changed
- Remove flag code generation logic, legacy python test runner in urfave/cli/pull/883 via @asahasrabuddhe
- Enable Go Modules support, drop support for
Go 1.10add support forGo 1.13in urfave/cli/pull/885 via @asahasrabuddhe
Release 1.22.0
🚧 Watch out! There's a known regression in this release! #850 🚧
Fixed
- Fix Subcommands not falling back to
app.ExitEventHandlerin urfave/cli/pull/856 via @FaranIdo
Changed
- Clarify that altsrc supports both TOML and JSON in urfave/cli/pull/774 via @whereswaldon
- Made the exit code example more clear in urfave/cli/pull/823 via @xordspar0
- Removed the use of python for internal flag generation in urfave/cli/pull/836 via @asahasrabuddhe
- Changed the supported go versions to
1.10,1.11,1.12in urfave/cli/pull/843 via @lafriks - Changed the v1 releases section in the readme in urfave/cli/pull/862 via @russoj88
- Cleaned up go modules in urfave/cli/pull/874 via @saschagrunert
Added
- Added
UseShortOptionHandlingfor combining short flags in urfave/cli/pull/735 via @rliebz - Added support for flags bash completion in urfave/cli/pull/808 via @yogeshlonkar
- Added the
TakesFileindicator to flag in urfave/cli/pull/851 via @saschagrunert - Added fish shell completion support in urfave/cli/pull/848 via @saschagrunert
Release 1.21.0
🚧 Watch out! There's a known regression in this release! #850 🚧
Fixed
- Fix using "slice" flag types with
EnvVarin urfave/cli/pull/687 via @joshuarubin - Fix regression of
SkipFlagParsingbehavior in urfave/cli/pull/697 via @jszwedko - Fix handling
ShortOptionsandSkipArgReorderin urfave/cli/pull/686 via @baude - Fix args reordering when bool flags are present in urfave/cli/pull/712 via @windler
- Fix parsing of short options in urfave/cli/pull/758 via @vrothberg
Added / Changed
- Added "required flags" support in urfave/cli/pull/819 via @lynncyrin
- Cleaned up help output in urfave/cli/pull/664 via @maguro
- Case is now considered when sorting strings in urfave/cli/pull/676 via @rliebz
- Backport JSON
InputSourceto v1 in urfave/cli/pull/598 via @jszwedko - Allow more customization of flag help strings in urfave/cli/pull/661 via @rliebz
- Allow custom
ExitErrorhandler function in urfave/cli/pull/628 via @phinnaeus - Allow loading a variable from a file in urfave/cli/pull/675 via @jmccann
- Allow combining short bool names in urfave/cli/pull/684 via @baude
cli v1.19.1
Fixed
- Fixes regression introduced in 1.19.0 where using an
ActionFuncas
theActionfor a command would cause it to error rather than calling the
function. Should not have a affected declarative cases usingfunc(c *cli.Context) err). - Shell completion now handles the case where the user specifies
--generate-bash-completionimmediately after a flag that takes an argument.
Previously it call the application with--generate-bash-completionas the
flag value.
cli v1.19.0
Added
FlagsByNamewas added to make it easy to sort flags (e.g.sort.Sort(cli.FlagsByName(app.Flags)))- A
Descriptionfield was added toAppfor a more detailed description of
the application (similar to the existingDescriptionfield onCommand) - Flag type code generation via
go generate - Write to stderr and exit 1 if action returns non-nil error
- Added support for TOML to the
altsrcloader SkipArgReorderwas added to allow users to skip the argument reordering.
This is useful if you want to consider all "flags" after an argument as
arguments rather than flags (the default behavior of the stdlibflag
library). This is backported functionality from the removal of the flag
reordering in the unreleased version
2- For formatted errors (those implementing
ErrorFormatter), the errors will
be formatted during output. Compatible withpkg/errors.
Changed
- Raise minimum tested/supported Go version to 1.2+
Fixed
- Consider empty environment variables as set (previously environment variables
with the equivalent of""would be skipped rather than their value used). - Return an error if the value in a given environment variable cannot be parsed
as the flag type. Previously these errors were silently swallowed. - Print full error when an invalid flag is specified (which includes the invalid flag)
App.Writerdefaults tostdoutwhennil- If no action is specified on a command or app, the help is now printed instead of
panicing App.Metadatais initialized automatically now (previously wasnilunless initialized)- Correctly show help message if
-his provided to a subcommand context.(Global)IsSetnow respects environment variables. Previously it
would returnfalseif a flag was specified in the environment rather than
as an argument- Removed deprecation warnings to STDERR to avoid them leaking to the end-user
altsrcs import paths were updated to usegopkg.in/urfave/cli.v1. This
fixes issues that occurred whengopkg.in/urfave/cli.v1was imported as well
asaltsrcwhere Go would complain that the types didn't match
cli v1.18.1
Fixed
- Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)
cli v1.17.1
Fixed
- Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)
cli v1.16.1
Fixed
- Removed deprecation warnings to STDERR to avoid them leaking to the end-user (backported)
v1.18.0
Added
./runteststest runner with coverage tracking by default- testing on OS X
- testing on Windows
UintFlag,Uint64Flag, andInt64Flagtypes and supporting code
Changed
- Use spaces for alignment in help/usage output instead of tabs, making the
output alignment consistent regardless of tab width
Fixed
- Printing of command aliases in help text
- Printing of visible flags for both struct and struct pointer flags
- Display the
helpsubcommand when usingCommandCategories - No longer swallows
panics that occur within theActions themselves when
detecting the signature of theActionfield
v1.17.0
Added
- Pluggable flag-level help text rendering via
cli.DefaultFlagStringFunc context.GlobalBoolTwas added as an analogue tocontext.GlobalBool- Support for hiding commands by setting
Hidden: true-- this will hide the
commands in help output
Changed
Float64Flag,IntFlag, andDurationFlagdefault values are no longer
quoted in help text output.- All flag types now include
(default: {value})strings following usage when a
default value can be (reasonably) detected. IntSliceFlagandStringSliceFlagusage strings are now more consistent
with non-slice flag types- Apps now exit with a code of 3 if an unknown subcommand is specified
(previously they printed "No help topic for...", but still exited 0. This
makes it easier to script around apps built usingclisince they can trust
that a 0 exit code indicated a successful execution. - cleanups based on Go Report Card
feedback