diff options
Diffstat (limited to 'Completion/User')
-rw-r--r-- | Completion/User/_cvs | 2 | ||||
-rw-r--r-- | Completion/User/_groups | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/Completion/User/_cvs b/Completion/User/_cvs index 66adf80df..f1324cfb2 100644 --- a/Completion/User/_cvs +++ b/Completion/User/_cvs @@ -468,7 +468,7 @@ _cvs_extract_file_entries () { builtin functions _cvs_extract_modifiedfile_entries >&- || _cvs_extract_modifiedfile_entries () { - if [[ -n "$compconfig[_cvs_disable_stat]" ]] || + if [[ -n "$compconfig[cvs_disable_stat]" ]] || ! { zmodload -e stat || zmodload stat }; then _cvs_extract_file_entries return diff --git a/Completion/User/_groups b/Completion/User/_groups index 61f63596e..b867634c0 100644 --- a/Completion/User/_groups +++ b/Completion/User/_groups @@ -2,8 +2,13 @@ local expl -: ${(A)groups:=${${(s: :)$(</etc/group)}%%:*}} -# : ${(A)groups:=${${(s: :)$(ypcat group.byname)}%%:*}} # If you use NIS +if (( ! $+groups )); then + if whence -p ypcat > /dev/null; then + : ${(A)groups:=${${(s: :)$(ypcat group.byname)}%%:*}} # If you use NIS + else + : ${(A)groups:=${${(s: :)$(</etc/group)}%%:*}} + fi +fi _description expl group compadd "$@" "$expl[@]" - $groups |