diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-13 01:55:02 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-03-13 01:55:02 +0000 |
commit | eaa55b546134c5adf461f485d4ab388df2b6ea8b (patch) | |
tree | b468903f4c4803961b9bda707e0addc8f098349c | |
parent | 7758948a62e02ea84b1ef5a0d2ec94d1dbd808ba (diff) | |
download | zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.tar.gz zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.tar.xz zsh-eaa55b546134c5adf461f485d4ab388df2b6ea8b.zip |
zsh-workers/10099
-rw-r--r-- | Completion/Base/_condition | 2 | ||||
-rw-r--r-- | Completion/User/_groups | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/Completion/Base/_condition b/Completion/Base/_condition index 51ac6bf0d..5e599a53c 100644 --- a/Completion/Base/_condition +++ b/Completion/Base/_condition @@ -4,7 +4,7 @@ local prev="$words[CURRENT-1]" if [[ "$prev" = -o ]]; then _tags -C -o options && _options -elif [[ "$prev" = -([no]t|ef) ]]; then +elif [[ "$prev" = -([a-hkprsuwxLOGSN]|[no]t|ef) ]]; then _tags -C "$prev" files && _files else _alternative 'files:: _files' 'parameters:: _parameters' diff --git a/Completion/User/_groups b/Completion/User/_groups index b4ecab38c..185b06549 100644 --- a/Completion/User/_groups +++ b/Completion/User/_groups @@ -1,13 +1,14 @@ #compdef newgrp -local expl groups +local expl groups tmp _wanted groups expl group || return 1 if ! zstyle -a ":completion:${curcontext}:" groups groups; then (( $+_cache_groups )) || - if (( ${+commands[ypcat]} )); then - : ${(A)_cache_groups:=${${(s: :)$(_call groups ypcat group.byname)}%%:*}} # If you use YP + if (( ${+commands[ypcat]} )) && + tmp=$(_call groups ypcat group.byname); then + : ${(A)_cache_groups:=${${(f)tmp}%%:*}} # If you use YP else : ${(A)_cache_groups:=${${(s: :)$(</etc/group)}%%:*}} fi |