Files
hush/completions/_hush
T
tomi c2aea05000 update README and zsh completions for profiles feature
- Document hush profiles subcommands and --profile flag in command table
- Add Profiles section with file format, creation flow, and hotkey example
- Expand configuration table with fireworks_api_key, provider fields, system_prompt
- Add profile name completion via _hush_profiles helper in zsh completion
- Add --profile/-p completion for toggle and stop commands
- Add profiles subcommand completion
2026-03-23 00:38:35 +01:00

62 lines
2.0 KiB
Plaintext

#compdef hush
_hush() {
local state
_arguments \
'1: :->command' \
'*: :->args' \
&& return 0
case $state in
command)
local commands=(
'daemon:Start the daemon in the foreground'
'start:Begin a new recording'
'stop:Stop recording and transcribe'
'abort:Cancel and discard the current recording'
'toggle:Start recording if idle, stop if recording'
'status:Show daemon state and recording duration'
'latency-test:Run a full STT+LLM round-trip latency test'
'setup:Interactive configuration wizard'
'show:Display current configuration'
'profiles:Manage configuration profiles'
)
_describe 'command' commands
;;
args)
case $words[2] in
show)
_arguments \
'--plain[Show plain key=value pairs instead of a table]' \
'--json[Show raw JSON output]'
;;
toggle|stop)
_arguments \
'--profile[Profile name to apply when processing]:profile:_hush_profiles' \
'-p[Profile name to apply when processing]:profile:_hush_profiles'
;;
profiles)
local subcommands=(
'list:List all available profiles'
'get:Print the contents of a profile'
'new:Create a new profile'
'edit:Open a profile in $EDITOR'
)
_describe 'profiles subcommand' subcommands
;;
esac
;;
esac
}
_hush_profiles() {
local profiles_dir="${HOME}/.config/hush/profiles"
if [[ -d "$profiles_dir" ]]; then
local profiles=("${profiles_dir}"/*(N:t))
_describe 'profile' profiles
fi
}
_hush "$@"