khard.actions

Names and aliases for the subcommands on the command line

Module Contents

Classes

Actions

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(alias: str) str | None

Find the name of the action for the supplied alias. If no action is associated with the given alias, None is returned.

Parameters:

alias – the alias to look up

Returns:

the name of the corresponding action or None

classmethod get_aliases(action: str) 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() Iterable[str]

Find the names of all defined actions.

Returns:

all action names

classmethod get_all() Generator[str, None, None]

Find the names of all defined actions and their aliases.

Returns:

the names of all actions and aliases