Created
April 3, 2022 11:46
-
-
Save nilninull/0ab54242320945c4eda34e3449510676 to your computer and use it in GitHub Desktop.
pw-jack completion definition for Zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef pw-jack | |
setopt localoptions extended_glob | |
local environ e cmd | |
local -a args | |
local -a _comp_priv_prefix | |
zstyle -a ":completion:${curcontext}:" environ environ | |
for e in "${environ[@]}"; do | |
local -x "$e" | |
done | |
args=( | |
'(-h)-h[show brief help]' | |
'(-r)-r+[remote daemon name]:remote name:' | |
'(-v)-v[verbose debug info]' | |
'(-s)-s+[samplerate (default "48000")]:sampling rate:(8000 11025 12000 16000 22050 24000 32000 44100 48000 64000 88200 96000 128000 176400 192000 384000)' | |
'(-p)-p+[period in samples]:period in samples:(16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536)' | |
'(-)1:command: _command_names -e' | |
'*::arguments:{ _comp_priv_prefix=( $cmd -n ${(kv)opt_args[(I)(-[ugHEP]|--(user|group|set-home|preserve-env|preserve-groups))]} ) ; _normal }' | |
) | |
_arguments -s -S $args |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment