ArgConfig class
A set of configuration options that can be passed to an ArgParser.
Constructors
Properties
- disableOptionsAfter → String?
-
The delimiter after which option parsing will be terminated. For posix,
this is usually
--
, soa -- -b
will havea
and-b
all parsed as positional arguments.final - hashCode → int
-
The hash code for this object.
no setterinherited
- inverseGenerator → InverseGenerator?
-
The function used to generate inverses of flags. If
null
, then no inverses will be generated by default.final - longPrefix → String
-
The prefix to use for long options, e.g.
--
.final - noOptionsAfterPositional → bool
-
Whether or not option parsing will be terminated after the first
positional argument. For instance, given
-x y -z
, if this is enabled, only-x
will be an option, andy
and-z
will be positional arguments.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortPrefix → String?
-
The prefix to use for short options, e.g.
-
. Ifnull
, short options are disabled.final
Methods
-
copyWith(
{String? longPrefix, String? shortPrefix, bool? noOptionsAfterPositional, String? disableOptionsAfter, InverseGenerator? inverseGenerator}) → ArgConfig -
Creates a copy of this configuration, with any non-null parameters changed
to the new values. As
null
is used to signify the lack of a new value, this function cannot be used to unset configuration parameters; use copyWithout() for that instead. -
copyWithout(
{bool shortPrefix = false, bool disableOptionsAfter = false, bool inverseGenerator = false}) → ArgConfig -
Creates a copy of this configuration, with any
true
parameters replaced withnull
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- defaultConfig → const ArgConfig
- The default configuration, using GNU-style parsing.
- gnu → const ArgConfig
- A configuration approximating GNU-style option parsing, which is the general standard on most Unix-like systems.
- go → const ArgConfig
- A configuration approximating Go-style option parsing. In particular, short options are disabled. Unlike Go, this does not support automatically inferring a full argument name given just its prefix.
- posixLike → const ArgConfig
- A configuration approximating POSIX-style argument parsing. This is similar to gnu, but options cannot come after a positional by default. Note that this also includes long option support, as Plade does not support disabling long options.
- windows → const ArgConfig
- A configuration approximating Windows-style argument parsing. I have no idea why anyone would want to use this.