khard.actions
¶
Names and aliases for the subcommands on the command line
Module Contents¶
Classes¶
A class to manage the names and aliases of the command line |
- class khard.actions.Actions¶
A class to manage the names and aliases of the command line subcommands.
- action_map :Dict[str, List[str]]¶
- classmethod get_action(cls, alias: str) Optional[str] ¶
Find the name of the action for the supplied alias. If no action is asociated with the given alias, None is returned.
- Parameters
alias – the alias to look up
- Rturns
the name of the corresponding action or None
- classmethod get_aliases(cls, action: str) Optional[List[str]] ¶
Find all aliases for the given action. If there is no such action, None is returned.
- Parameters
action – the action name to look up
- Returns
the list of aliases corresponding to the action or None
- classmethod get_actions(cls) Iterable[str] ¶
Find the names of all defined actions.
- Returns
all action names
- classmethod get_all(cls) Generator[str, None, None] ¶
Find the names of all defined actions and their aliases.
- Returns
the names of all actions and aliases