diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2001-08-06 16:05:48 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2001-08-06 16:05:48 +0000 |
commit | 2fa720395f4f2baa067798dadf710e623ce5253c (patch) | |
tree | c8e1da75c8fe3da8247953945a95fde6f0174990 /Completion/Unix/Type | |
parent | 5031b52277ad8a05fa6e91b3f07cc229bf63f2d4 (diff) | |
download | zsh-2fa720395f4f2baa067798dadf710e623ce5253c.tar.gz zsh-2fa720395f4f2baa067798dadf710e623ce5253c.tar.xz zsh-2fa720395f4f2baa067798dadf710e623ce5253c.zip |
new completion for useradd, groupmod etc and fix in _cvs (15574)
Diffstat (limited to 'Completion/Unix/Type')
-rw-r--r-- | Completion/Unix/Type/_directories | 3 | ||||
-rw-r--r-- | Completion/Unix/Type/_groups | 19 | ||||
-rw-r--r-- | Completion/Unix/Type/_users | 2 |
3 files changed, 23 insertions, 1 deletions
diff --git a/Completion/Unix/Type/_directories b/Completion/Unix/Type/_directories new file mode 100644 index 000000000..9a1a9c1f3 --- /dev/null +++ b/Completion/Unix/Type/_directories @@ -0,0 +1,3 @@ +#compdef rmdir df du dircmp dirs + +_files -/ "$@" diff --git a/Completion/Unix/Type/_groups b/Completion/Unix/Type/_groups new file mode 100644 index 000000000..bbb80868b --- /dev/null +++ b/Completion/Unix/Type/_groups @@ -0,0 +1,19 @@ +#compdef newgrp groupdel + +local expl groups tmp + +_tags groups || return 1 + +if ! zstyle -a ":completion:${curcontext}:" groups groups; then + (( $+_cache_groups )) || + if (( ${+commands[ypcat]} )) && + tmp=$(_call_program groups ypcat group.byname 2>/dev/null); then + : ${(A)_cache_groups:=${${(f)tmp}%%:*}} # If you use YP + else + : ${(A)_cache_groups:=${${(s: :)$(</etc/group)}%%:*}} + fi + + groups=( "$_cache_groups[@]" ) +fi + +_wanted groups expl group compadd "$@" -a groups diff --git a/Completion/Unix/Type/_users b/Completion/Unix/Type/_users index 573d8fdb1..d04a16afe 100644 --- a/Completion/Unix/Type/_users +++ b/Completion/Unix/Type/_users @@ -1,4 +1,4 @@ -#compdef passwd groups +#compdef passwd groups userdel local expl users |