cmdline
Note
This module requires click, which pip users can install with the
jnrbase[cmdline] requirement.
For information on the command line interface itself, see the jnrbase
manpage.
Support functions
-
jnrbase.cmdline.get_default(__func, __arg)[source]
Fetch default value for a function argument.
- Parameters
-
- Return type
str
-
jnrbase.cmdline.text_arg(__func)[source]
Add task selection click commands.
Note
This is only here to reduce duplication in command setup.
- Parameters
__func (Callable) – Function to add options to
- Return type
Callable
- Returns
Function with additional options
Examples
$ jnrbase --version
jnrbase, version 0.9.0
$ jnrbase pretty-time 2018-01-18T00:00
about six hours ago
$ jnrbase config rdial 'run wrappers' mutt
-c mutt mail