From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4148 invoked from network); 3 Jul 2001 18:28:04 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Jul 2001 18:28:04 -0000 Received: (qmail 21354 invoked by alias); 3 Jul 2001 18:27:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15245 Received: (qmail 21317 invoked from network); 3 Jul 2001 18:27:04 -0000 Date: Wed, 04 Jul 2001 03:27:53 +0900 Message-ID: <86lmm5ook6.wl@archon.local.idaemons.org> From: "Akinori MUSHA" To: Bart Schaefer Cc: Oliver Kiddle , zsh-workers@sunsite.dk Subject: Re: a compdef for FreeBSD's sysctl(8) command In-Reply-To: <1010703162832.ZM14591@candle.brasslantern.com> References: <86y9q6d0fz.wl@archon.local.idaemons.org> <3B41A31E.ED8B154E@u.genie.co.uk> <86u20uclfr.wl@archon.local.idaemons.org> <1010703162832.ZM14591@candle.brasslantern.com> 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 I found some bugs in the previous version and fixed. Please use the attached one. Regards, -- / /__ __ 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 $OSTYPE in freebsd[0-4].*) _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)]' \ '*:sysctl variable:compadd ${words[(r)-w]:+-S=} $(sysctl -A | sed "/^[^a-z]/d;s/:.*//")' ;; 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)]' \ '*:sysctl variable:compadd -S "" - $(sysctl -aN)' ;; linux*) _arguments -A "-*" \ '-n[show only variable values]' \ '(-n -p -a -A)-w[write mode]' \ '(-n -w -a -A *)-p[specify file to load sysctl settings from]:file:_files' \ '(-n -w -p -A *)-a[list all]' \ '(-n -w -p -a *)-A[list all in table form]' \ '(-n -p -a -A)*:sysctl variable:_files -W /proc/sys' ;; esac