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
This commit is contained in:
@@ -20,6 +20,7 @@ _hush() {
|
||||
'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
|
||||
;;
|
||||
@@ -30,9 +31,31 @@ _hush() {
|
||||
'--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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user