craft_cli.completion package¶
Submodules¶
- craft_cli.completion.completion module
Option
Action
Action.alias
Action.arrayvar
Action.binding
Action.builtin
Action.command
Action.directory
Action.disabled
Action.enabled
Action.export
Action.file
Action.function
Action.group
Action.helptopic
Action.hostname
Action.job
Action.keyword
Action.running
Action.service
Action.setopt
Action.shopt
Action.signal
Action.user
Action.variable
get_set_flags()
CompGen
Arg
Argument
OptionArgument
CommandMapping
complete()
main()
Module contents¶
Bash completion script generation module.
- craft_cli.completion.complete(shell_cmd: str, get_app_info: Callable[[], Tuple[Dispatcher, Dict[str, Any] | None]]) str [source]¶
Generate a bash completion script based on a craft-cli dispatcher.
- Parameters:
shell_cmd – The name of the command being completed for
get_app_info – A function that returns a populated craft-cli dispatcher and the config
needed to create its commands :return: A bash completion script for
shell_cmd