From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11173 invoked from network); 3 Jul 2001 06:31:29 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Jul 2001 06:31:29 -0000 Received: (qmail 12440 invoked by alias); 3 Jul 2001 06:30:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15220 Received: (qmail 12401 invoked from network); 3 Jul 2001 06:30:20 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: Subject: RE: a compdef for FreeBSD's sysctl(8) command Date: Tue, 3 Jul 2001 10:31:09 +0400 Message-ID: <001701c10389$bf457e50$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: <86y9q6d0fz.wl@archon.local.idaemons.org> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2479.0006 Just to comment that it exists in Linux as well. > -----Original Message----- > From: Akinori MUSHA [mailto:knu@iDaemons.org] > Sent: Tuesday, July 03, 2001 9:52 AM > To: zsh-workers@sunsite.auc.dk > Subject: a compdef for FreeBSD's sysctl(8) command > > > 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 > >