Class CompletionGenerate
java.lang.Object
ai.wanaku.cli.main.commands.BaseCommand
ai.wanaku.cli.main.commands.completion.CompletionGenerate
Command to generate shell completion scripts for bash and zsh.
Supports generating completion scripts for:
- bash - Bash shell completion
- zsh - Zsh shell completion (uses bash completion via bashcompinit)
The generated completion script includes all subcommands, options, and their descriptions, enabling tab-completion for the entire Wanaku CLI.
Usage Examples
# Generate bash completion script to stdout wanaku completion generate # Generate and save bash completion script wanaku completion generate --output /etc/bash_completion.d/wanaku_completion # Generate zsh completion script (same format works for both) wanaku completion generate --output ~/.zsh/completions/_wanaku
Installation
After generating the completion script, you need to source it in your shell:
# For bash (add to ~/.bashrc) source /etc/bash_completion.d/wanaku_completion # For zsh (add to ~/.zshrc) autoload -U +X bashcompinit && bashcompinit source ~/.zsh/completions/_wanaku
-
Field Summary
Fields inherited from class ai.wanaku.cli.main.commands.BaseCommand
authTokenOverride, EXIT_ERROR, EXIT_OK, noAuth -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoCall(org.jline.terminal.Terminal terminal, WanakuPrinter printer) Methods inherited from class ai.wanaku.cli.main.commands.BaseCommand
call, initAuthenticatedService, initService, initService
-
Constructor Details
-
CompletionGenerate
public CompletionGenerate()
-
-
Method Details
-
doCall
- Specified by:
doCallin classBaseCommand- Throws:
Exception
-