summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-10-02 15:02:33 +0200
committerOliver Kiddle <opk@zsh.org>2014-10-02 15:02:33 +0200
commitdad5063a7c8f30654bc2f3f5d0cf6b53f79ec444 (patch)
tree96bf4d372de88b492270d5de0e159279da65145d
parentc080bd52bc2ad89c151839d256b269651a67e63c (diff)
downloadzsh-dad5063a7c8f30654bc2f3f5d0cf6b53f79ec444.tar.gz
zsh-dad5063a7c8f30654bc2f3f5d0cf6b53f79ec444.tar.xz
zsh-dad5063a7c8f30654bc2f3f5d0cf6b53f79ec444.zip
33315: fix pattern to match freebsd10 and later
-rw-r--r--Completion/Unix/Command/_sysctl9
1 files changed, 6 insertions, 3 deletions
diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl
index 36b579bc7..ff3312fac 100644
--- a/Completion/Unix/Command/_sysctl
+++ b/Completion/Unix/Command/_sysctl
@@ -1,9 +1,9 @@
 #compdef sysctl
 
 case $OSTYPE in
-  *freebsd[5-9].*|freebsd4.[4-9]*)
+  *freebsd<5->.*|freebsd4.[4-9]*)
     local -a sysctlvars
-    sysctlvars=( $(sysctl -aN) )
+    sysctlvars=( $(_call_program sysctl-variables sysctl -aN) )
     _arguments -s -A "-*" \
       '(*)-a[list all]' \
       '-b[binary output]' \
@@ -41,5 +41,8 @@ case $OSTYPE in
       '(-w)-n[show only values]' \
       '(-a -A -n)-w[write variable]' \
       '(-a -A)*:sysctl variable:_multi_parts ${words[(r)-w]:+-S=} -i . _cache_sysctlvars'
-    ;;
+  ;;
+  *)
+    _default
+  ;;
 esac