Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

a small patch for _sysctl



Hi again,

FreeBSD 4.4-RELEASE is drawing near (about in a month) and the changes
made to sysctl(8) in 5.0-CURRENT has been merged to the stable
(4-STABLE) branch.

So, I'd like you to commit the attached patch to reflect it.

Thanks in advance,

-- 
                     /
                    /__  __            Akinori.org / MUSHA.org
                   / )  )  ) )  /     FreeBSD.org / Ruby-lang.org
Akinori MUSHA aka / (_ /  ( (__(  @ iDaemons.org / and.or.jp

"Freeze this moment a little bit longer, make each impression
  a little bit stronger..  Experience slips away -- Time stand still"

Index: Completion/Unix/Command/_sysctl
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_sysctl,v
retrieving revision 1.2
diff -u -r1.2 _sysctl
--- Completion/Unix/Command/_sysctl	2001/07/06 11:22:15	1.2
+++ Completion/Unix/Command/_sysctl	2001/08/01 18:15:06
@@ -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 "-*" \
@@ -23,6 +12,17 @@
       '(-x)-o[show opaques as well (values suppressed)]' \
       '(-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 "-*" \



Messages sorted by: Reverse Date, Date, Thread, Author