diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-11-29 02:28:06 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-11-29 02:28:06 +0000 |
commit | 67ed8932afa8e0158ea1ce922d8dbc015dce339e (patch) | |
tree | d87c66ba030c1c5d2c7ea691cead3479f2efd417 /Completion | |
parent | f2f4725b8ea9ca3e0e6639a0e84c48fcb5628e29 (diff) | |
download | zsh-67ed8932afa8e0158ea1ce922d8dbc015dce339e.tar.gz zsh-67ed8932afa8e0158ea1ce922d8dbc015dce339e.tar.xz zsh-67ed8932afa8e0158ea1ce922d8dbc015dce339e.zip |
Merge of users/12154 by Ryan F: MacOS X group completion.
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Unix/Type/_groups | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/Unix/Type/_groups b/Completion/Unix/Type/_groups index 923c34599..a5624269e 100644 --- a/Completion/Unix/Type/_groups +++ b/Completion/Unix/Type/_groups @@ -7,7 +7,11 @@ _tags groups || return 1 if ! zstyle -a ":completion:${curcontext}:" groups groups; then (( $+_cache_groups )) || if [[ $OSTYPE = darwin* ]]; then - : ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups lookupd -q group)"}:#name*}##*: }} + if (( ${+commands[lookupd]} )); then + : ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups lookupd -q group)"}:#name*}##*: }} + elif (( ${+commands[dscacheutil]} )); then + : ${(A)_cache_groups:=${${(M)${(f)"$(_call_program groups dscacheutil -q group)"}:#name*}##*: }} + fi elif (( ${+commands[getent]} )); then : ${(A)_cache_groups:=${${(s: :)$(_call_program groups getent group 2>/dev/null)}%%:*}} else |