Additions
- Command definition validation now checks for name collisions between options
and flags. ValidationError.message
is now publicly accessible.- Added an
EnumerableFlag
protocol forCaseIterable
types that are used to
provide the names for flags. When declaring conformance toEnumerableFlag
,
you can override the name specification and help text for individual flags.
See #65 for more detail. - When a command that requires arguments is called with no arguments at all,
the error message includes the full help text instead of the short usage
string. This is intended to provide a better experience for first-time users. - Added a
helpMessage()
method for generating the help text for a command
or subcommand.
Deprecations
-
@Flag
properties that useCaseIterable
/String
types as their values
are deprecated, and the related@Flag
initializers will be removed
in a future version.Migration: Add
EnumerableFlag
conformance to the type of these kinds of
@Flag
properties.
Fixes
- Errors thrown while parsing in a
transform
closure are printed correclty
instead of a generalInvalid state
error. - Improvements to the guides and in the error message when attempting to access
a value from an argument/option/flag definition. - Fixed issues in the CMake and Windows build configurations.
- You can now use an
=
to join a value with an option's short name when calling
a command. This previously only worked for long names.