From dd1818408fb1f20c33a0e8ba573b971a6fd11a47 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Tue, 3 Jul 2001 16:37:35 +0000 Subject: add completion for sysctl(8) (15215, 15223) --- Completion/Unix/Command/.distfiles | 18 ++++++++++++++++++ Completion/Unix/Command/_sysctl | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 Completion/Unix/Command/.distfiles create mode 100644 Completion/Unix/Command/_sysctl (limited to 'Completion/Unix/Command') diff --git a/Completion/Unix/Command/.distfiles b/Completion/Unix/Command/.distfiles new file mode 100644 index 000000000..dbab4a8fb --- /dev/null +++ b/Completion/Unix/Command/.distfiles @@ -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 +' diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl new file mode 100644 index 000000000..4a2eaaf87 --- /dev/null +++ b/Completion/Unix/Command/_sysctl @@ -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 -- cgit 1.4.1