diff options
| author | Oliver Kiddle <opk@users.sourceforge.net> | 2005-08-01 16:23:23 +0000 |
|---|---|---|
| committer | Oliver Kiddle <opk@users.sourceforge.net> | 2005-08-01 16:23:23 +0000 |
| commit | fb81e044f1baf0b8c6befdc837f7b9835936ac87 (patch) | |
| tree | b98ec985665fd1b4a2addcc49cf9e5ca1d6d9b26 /Completion/Unix/Command | |
| parent | 21552: Thorsten Dahlheimer: various fixes to print builtin (diff) | |
| download | zsh-fb81e044f1baf0b8c6befdc837f7b9835936ac87.tar zsh-fb81e044f1baf0b8c6befdc837f7b9835936ac87.tar.gz zsh-fb81e044f1baf0b8c6befdc837f7b9835936ac87.tar.bz2 zsh-fb81e044f1baf0b8c6befdc837f7b9835936ac87.tar.lz zsh-fb81e044f1baf0b8c6befdc837f7b9835936ac87.tar.xz zsh-fb81e044f1baf0b8c6befdc837f7b9835936ac87.tar.zst zsh-fb81e044f1baf0b8c6befdc837f7b9835936ac87.zip | |
21393: add missing local declarations
Diffstat (limited to 'Completion/Unix/Command')
| -rw-r--r-- | Completion/Unix/Command/_kvno | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/Completion/Unix/Command/_kvno b/Completion/Unix/Command/_kvno index 812d728de..285aab3c8 100644 --- a/Completion/Unix/Command/_kvno +++ b/Completion/Unix/Command/_kvno @@ -1,22 +1,24 @@ #compdef kvno -_arguments \ - '-c[credentials cache]:cache:_files' \ - '-e[enctype]:enctype:' \ - '-q[suppress printing]' \ - '-h[help]' \ - '-4[kerberos 4 tickets]' \ - ':principal:->principal' && return 0 +local curcontext="$curcontext" state line ret=1 -case "$state" in - (principal) - if [[ -prefix host/ ]]; then - compset -P host/ - _hosts - else - _alternative \ - 'users:user:_users' \ - 'services:service:compadd -S/ host' - fi - ;; -esac +_arguments -C \ + '(-4)-c[specify credentials cache to use]:cache:_files' \ + '(-4)-e[specify encryption type]:encryption type' \ + '-q[suppress printing]' \ + '(- :)-h[display help information]' \ + '(-c -e)-4[kerberos 4 tickets]' \ + ':principal:->principal' && ret=0 + +if [[ $state = principal ]]; then + if [[ -prefix host/ ]]; then + compset -P host/ + _hosts && ret=0 + else + _alternative \ + 'users:user:_users' \ + 'services:service:compadd -S/ host' && ret=0 + fi +fi + +return ret |
