Arguments
Todo
Naming convention
Basic classes → Argument
Named arguments → Flag
Character prefixes → Short, Long, Windows
Overview
Without Prefix Character(s)
RAW Format |
Examples |
Argument Class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Executable
An executable argument represents a program/executable. The internal value is a Path
object.
Command
Commands are (usually) mutually exclusive arguments and the first argument in a list of arguments to a program. They are used to logically group arguments.
While commands can or cannot have prefix characters, they shouldn’t be confused with flag arguments or string arguments.
Example:
prog command -arg1 --argument2
See also
For simple flags (various formats).
→Flag
For string arguments.
→StringArgument
String
A simple argument accepting any string value. If a string has a predefined format, more specific argument classes should
be used like Command
, Flag
or
PathArgument
.
See also
For path argument.
→PathArgument
List of Strings
Like StringArgument
but supporting a list of strings.
See also
For list of path arguments.
→PathListArgument
Path
An argument accepting a Path
object.
List of Paths
Like PathArgument
but supporting a list of paths.
With Prefix Character(s)
Commonly used prefix characters are: single and double dash, single slash, or plus character(s).
Single Dash Argument Format |
Double Dash Argument Format |
Single Slash Argument Format |
Argument Class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Command
Todo
Write documentation.
Flag
A flag is a command line argument that is either present or not. If present that argument is said to be activated or true.
3 variants are predefined with prefixes -
, --
and /
.
Variants
Flag with Value
Todo
Write documentation.
Boolean Flag
Todo
Write documentation.
Flag with Optional Value
Todo
Write documentation.
List of Flags with Value
Todo
Write documentation.
Flag with Value as a Tuple
Todo
Write documentation.