Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: a compdef for FreeBSD's sysctl(8) command
- X-seq: zsh-workers 15245
- From: "Akinori MUSHA" <knu@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- Subject: Re: a compdef for FreeBSD's sysctl(8) command
- Date: Wed, 04 Jul 2001 03:27:53 +0900
- Cc: Oliver Kiddle <opk@xxxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- In-reply-to: <1010703162832.ZM14591@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: Associated I. Daemons
- References: <86y9q6d0fz.wl@xxxxxxxxxxxxxxxxxxxxxxxxx> <3B41A31E.ED8B154E@xxxxxxxxxxxxx> <86u20uclfr.wl@xxxxxxxxxxxxxxxxxxxxxxxxx> <1010703162832.ZM14591@xxxxxxxxxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author