diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2001-08-03 16:53:26 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2001-08-03 16:53:26 +0000 |
commit | 0c3f0b47bff6279c8601f3313144db6d2d1ee980 (patch) | |
tree | 282eaddba4bbc7efe7e778480e907a4f640127a5 /Completion/Unix | |
parent | 1ba5ba91ae0768f2ffe34c6e46483593380cc5f8 (diff) | |
download | zsh-0c3f0b47bff6279c8601f3313144db6d2d1ee980.tar.gz zsh-0c3f0b47bff6279c8601f3313144db6d2d1ee980.tar.xz zsh-0c3f0b47bff6279c8601f3313144db6d2d1ee980.zip |
new BSD completion and fix _chown for symlinks
Diffstat (limited to 'Completion/Unix')
-rw-r--r-- | Completion/Unix/Command/_chown | 1 | ||||
-rw-r--r-- | Completion/Unix/Command/_sysctl | 24 |
2 files changed, 13 insertions, 12 deletions
diff --git a/Completion/Unix/Command/_chown b/Completion/Unix/Command/_chown index 34b31f6c9..f5ff8f45e 100644 --- a/Completion/Unix/Command/_chown +++ b/Completion/Unix/Command/_chown @@ -28,6 +28,7 @@ else [[ -n $grp ]] && grp="${${(M)grp:#[0-9]#}:-.$grp.}" req=( ${usr:+\^u$usr} ${grp:+\^g$grp} ) (( EUID )) && req=( u$EUID$^req ) + req=( -$^req ) _files -g "*(${(j:,:)req})" && return 0 fi diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl index 1ac0394e7..bda6a5ac2 100644 --- a/Completion/Unix/Command/_sysctl +++ b/Completion/Unix/Command/_sysctl @@ -1,18 +1,7 @@ #compdef sysctl case $OSTYPE in - freebsd[0-4].*) - : ${(A)_cache_sysctlvars:=${${$(sysctl -A):#[^a-z]*}%%:*}} - _arguments -s -A "-*" \ - '(-w -X *)-a[list all]' \ - '(-w -X *)-A[show all opaques (values suppressed)]' \ - '(-w)-b[binary output]' \ - '(-w)-n[show only variable values]' \ - '(-a -A -b -n -X)-w[write mode]' \ - '(-a -A -w *)-X[show all opaques (entire values)]' \ - '(-a -A -X)*:sysctl variable:_multi_parts ${words[(r)-w]:+-S=} -i . _cache_sysctlvars' - ;; - freebsd[5-9].*) + freebsd[5-9].*|freebsd4.[4-9]*) local -a sysctlvars sysctlvars=( $(sysctl -aN) ) _arguments -s -A "-*" \ @@ -24,6 +13,17 @@ case $OSTYPE in '(-o)-x[show opaques as well (entire values)]' \ '(-a)*:sysctl variable:_multi_parts -i . sysctlvars' ;; + freebsd[0-4].*) + : ${(A)_cache_sysctlvars:=${${$(sysctl -A):#[^a-z]*}%%:*}} + _arguments -s -A "-*" \ + '(-w -X *)-a[list all]' \ + '(-w -X *)-A[show all opaques (values suppressed)]' \ + '(-w)-b[binary output]' \ + '(-w)-n[show only variable values]' \ + '(-a -A -b -n -X)-w[write mode]' \ + '(-a -A -w *)-X[show all opaques (entire values)]' \ + '(-a -A -X)*:sysctl variable:_multi_parts ${words[(r)-w]:+-S=} -i . _cache_sysctlvars' + ;; linux*) _arguments -A "-*" \ '-n[show only variable values]' \ |