From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10734 invoked from network); 3 Jul 2001 05:52:26 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Jul 2001 05:52:26 -0000 Received: (qmail 1241 invoked by alias); 3 Jul 2001 05:51:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15215 Received: (qmail 1150 invoked from network); 3 Jul 2001 05:51:15 -0000 Date: Tue, 03 Jul 2001 14:52:00 +0900 Message-ID: <86y9q6d0fz.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: zsh-workers@sunsite.auc.dk Subject: a compdef for FreeBSD's sysctl(8) command User-Agent: Wanderlust/2.5.4 (Smooth) SEMI/1.14.2 (=?ISO-8859-1?Q?Daish=F2?= =?ISO-8859-1?Q?ji?=) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (i386--freebsd) Organization: Associated I. Daemons X-PGP-Public-Key: finger knu@FreeBSD.org X-PGP-Fingerprint: 081D 099C 1705 861D 4B70 B04A 920B EFC7 9FD9 E1EE MIME-Version: 1.0 (generated by SEMI 1.14.2 - =?ISO-8859-1?Q?=22Daish=F2ji=22?=) Content-Type: text/plain; charset=US-ASCII Hi, Attached is a compdef for FreeBSD's sysctl(8) command which gets or sets kernel state. It was reviewed in a public mailing list. Would you please merge this? 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" #compdef sysctl case `uname -sr` in FreeBSD\ [0-4].*) (( $+functions[_sysctl_variables] )) || _sysctl_variables() { local ret=1 sup=' ' (( $words[(I)-*w*] )) && sup='=' compadd "$@" -S $sup - $(sysctl -A | sed 's/:.*//') && ret=0 return ret } _arguments -s \ '-a[list all]' \ '-A[show all opaques (values suppressed)]' \ '-b[binary output]' \ '-n[show only variable values]' \ '-w[write mode]' \ '-X[show all opaques (entire values)]' \ '*:variable:_sysctl_variables' ;; FreeBSD\ [5-9].*) _arguments -s \ '-a[list all]' \ '-b[binary output]' \ '-N[show only variable names]' \ '-n[show only variable values]' \ '-o[show opaques as well (values suppressed)]' \ '-x[show opaques as well (entire values)]' \ '*:variable:compadd -S "" - $(sysctl -aN)' ;; esac