mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-13 23:31:08 +02:00
add completion for sysctl(8) (15215, 15223)
This commit is contained in:
parent
4b66cd7682
commit
dd1818408f
3 changed files with 57 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2001-07-03 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 15223, Akinori Musha: 15215: Completion/Unix/Command/.distfiles,
|
||||
Completion/Unix/Command/_sysctl: Add completion for sysctl(8)
|
||||
|
||||
2001-07-02 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* unposted: zshconfig.ac: Remove references to FUNCINST_MK.
|
||||
|
@ -5,7 +10,7 @@
|
|||
2001-07-02 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 15204: zshconfig.ac, Src/compat.c, Src/params.c: fix compilation
|
||||
problems on IRIX 5.2 and correct error messages
|
||||
problems on IRIX 5.3 and correct error messages
|
||||
|
||||
2001-06-30 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
|
|
18
Completion/Unix/Command/.distfiles
Normal file
18
Completion/Unix/Command/.distfiles
Normal file
|
@ -0,0 +1,18 @@
|
|||
DISTFILES_SRC='
|
||||
.distfiles
|
||||
_a2ps _dvi _gzip _man _rcs _w3m
|
||||
_apachectl _enscript _iconv _mh _rlogin _webbrowser
|
||||
_archie _fakeroot _imagemagick _mount _sh _wget
|
||||
_arp _fetchmail _init_d _mutt _slrn _whereis
|
||||
_bison _find _ispell _mysql_utils _socket _whois
|
||||
_bzip2 _finger _java _ncftp _ssh _xargs
|
||||
_chown _flex _joe _nslookup _strip _yodl
|
||||
_compress _gcc _killall _pack _stty _yp
|
||||
_configure _gdb _look _patch _su _zcat
|
||||
_cpio _getconf _lp _pbm _sudo _zdump
|
||||
_cvs _gnu_generic _ls _perl _tar _zip
|
||||
_dd _gprof _lynx _perldoc _telnet _pine
|
||||
_dict _grep _lzop _prcs _tiff _elm
|
||||
_diff _gs _make _psutils _tin _apm _mail
|
||||
_loadkeys _modutils _ruby _sysctl
|
||||
'
|
33
Completion/Unix/Command/_sysctl
Normal file
33
Completion/Unix/Command/_sysctl
Normal file
|
@ -0,0 +1,33 @@
|
|||
#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 '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
|
Loading…
Reference in a new issue