CLI command
skarbiec completion
Complete Skarbiec's command names and flags in the shell, from the same table --help prints, so completion never offers a command or flag the binary does not have.
Invocation#
skarbiec completion [--shell fish]Purpose#
Complete Skarbiec's command names and flags in the shell, from the same table --help prints, so completion never offers a command or flag the binary does not have.
Required inputs and options#
- No arguments for bash: load it with `source <(skarbiec completion)`, or save it under bash-completion's directory; in zsh run `autoload -U bashcompinit && bashcompinit` first. --shell fish writes the fish script instead: `skarbiec completion --shell fish > ~/.config/fish/completions/skarbiec.fish`.
Output and state effects#
- Prints a script, not JSON: the first word completes to every command `skarbiec --help` lists, and each later word to the flags that command's usage line names; fish also shows each command's summary up to its first clause beside it. It reads no vault and writes nothing.
Refusals#
- --shell naming a shell other than bash or fish exits 2 with `completion --shell <shell>: skarbiec writes bash and fish completion; zsh loads the bash one`. A shell without completion support ignores the builtin the script calls.