Reference
CLI: shell completions
Enable command and option completion in your shell.
Install for zsh
For zsh, install completions for your current user:
legra system completions install --shell zsh
Follow the command's instructions to load the completions in your shell.
Generate for another shell
To generate a completion script:
legra system completions generate <shell>
Supported shell names are bash, elvish, fish, powershell, and zsh.
For example, save a Bash script and load it in the current session:
legra system completions generate bash > legra-completions.bash
source legra-completions.bash
Managed installation currently supports zsh. For other shells, place the generated script in the completion location your shell uses.
Try a completion
After loading the Bash script above, type this command followed by a space. Leave it unexecuted:
legra graph query names.rq --format
Press Tab twice. Bash shows the available result formats, json and tsv:
Type t and press Tab to complete tsv. Press Ctrl+C to cancel the command
when you are finished trying completions. This example does not need a
workspace connection because it never executes the query.
