vrk completions
About
Generates tab-completion scripts for your shell. After installing, vrk
The problem
You install vrksh but tab-completion does not work. You cannot remember all 28 tool names or their flags. You type vrk and hit tab and nothing happens.
Before and after
Before
# write a bash completion script by hand
_vrk_complete() {
COMPREPLY=($(compgen -W "tok jwt epoch ..." -- "${COMP_WORDS[1]}"))
}
complete -F _vrk_complete vrk
After
vrk completions bash > ~/.bash_completion.d/vrk
Example
vrk completions bash > ~/.bash_completion.d/vrk
Exit codes
| Code | Meaning |
|---|---|
| 0 | Script emitted to stdout |
| 1 | Unknown shell argument |
| 2 | No shell argument provided |
Flags
| Flag | Short | Type | Description |
|---|---|---|---|
--json | -j | bool | Emit errors as JSON |