feat: Add Zsh shell completion support for the toak command and integrate its installation.
This commit is contained in:
56
_toak
Normal file
56
_toak
Normal file
@@ -0,0 +1,56 @@
|
||||
#compdef toak
|
||||
|
||||
_toak() {
|
||||
local line
|
||||
local -a commands
|
||||
local -a global_options
|
||||
|
||||
global_options=(
|
||||
'(-v --verbose)'{-v,--verbose}'[Enable detailed debug logging]'
|
||||
'(-h --help)'{-h,--help}'[Show help message]'
|
||||
'--version[Show version information]'
|
||||
)
|
||||
|
||||
commands=(
|
||||
'toggle:Starts or stops the recording'
|
||||
'discard:Abort current recording without transcribing'
|
||||
'onboard:Configure the application'
|
||||
'latency-test:Benchmark full pipeline without recording'
|
||||
'show:Show current configuration'
|
||||
'config:Update a specific configuration setting'
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
$global_options \
|
||||
'1: :->cmds' \
|
||||
'*:: :->args'
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
_describe -t commands 'command' commands
|
||||
;;
|
||||
args)
|
||||
case $words[1] in
|
||||
toggle)
|
||||
_arguments \
|
||||
'(-p --pipe)'{-p,--pipe}'[Output transcription to stdout instead of typing]' \
|
||||
'--copy[Copy to clipboard instead of typing]'
|
||||
;;
|
||||
discard)
|
||||
_arguments \
|
||||
'(-p --pipe)'{-p,--pipe}'[Output transcription to stdout instead of typing]'
|
||||
;;
|
||||
config)
|
||||
_arguments \
|
||||
'1:key:(llm whisper language lang backend punctuation tech)' \
|
||||
'2:value:'
|
||||
;;
|
||||
*)
|
||||
_message "no more arguments"
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
_toak "$@"
|
||||
Reference in New Issue
Block a user