recline.arg_types.positional module
Original © NetApp 2024
A Positional type allows the CLI command writer to specify an argument that the user will provide positionally. That is, instead of the user typing “-arg_name argvalue”, they can just type “argvalue”. For example:
@recline.command def ls(path: Positional = “.”) -> None:
# If the user provided “ls my_dir”, then path will be set to “my_dir”. If the # user just said “ls”, then path will be set to “.”.
- class recline.arg_types.positional.Positional
Bases:
ReclineType
The Positional type allows the user to not have to specify the argument name
- static define(completer=None, data_type=<class 'str'>)
Allows a Positional type to be defined with its own completer function