Skip to content

Releases: alecthomas/kingpin

Cumulative positional args + envars + --version

19 Jun 00:57
Compare
Choose a tag to compare
  • Use OverrideDefaultFromEnvar(envar) to allow flag values to be overridden by environment variables.
  • Support cumulative arg parsing of remaining args "Args[n:]".
  • Add Version(v) function to automatically add a --version flag.
  • Bug fixes.

Change semantics of flag place-holders in help.

19 Jun 00:57
Compare
Choose a tag to compare

The place-holder value for a flag is the value used in the help to describe
the value of a non-boolean flag.

The value provided to PlaceHolder() is used if provided, then the value
provided by Default() if provided, then finally the capitalised flag name is
used.

Here are some examples of flags with various permutations:

--name=NAME           // Flag(...).String()
--name="Harry"        // Flag(...).Default("Harry").String()
--name=FULL-NAME      // flag(...).PlaceHolder("FULL-NAME").Default("Harry").String()