diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2001-07-03 16:37:35 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2001-07-03 16:37:35 +0000 |
commit | dd1818408fb1f20c33a0e8ba573b971a6fd11a47 (patch) | |
tree | 4dc493326749943bd1abefb4cb7f36de87f83c6e /Completion/Unix/Command/_sysctl | |
parent | 4b66cd7682e2576c3982e58e888ad810fedbb493 (diff) | |
download | zsh-dd1818408fb1f20c33a0e8ba573b971a6fd11a47.tar.gz zsh-dd1818408fb1f20c33a0e8ba573b971a6fd11a47.tar.xz zsh-dd1818408fb1f20c33a0e8ba573b971a6fd11a47.zip |
add completion for sysctl(8) (15215, 15223)
Diffstat (limited to 'Completion/Unix/Command/_sysctl')
-rw-r--r-- | Completion/Unix/Command/_sysctl | 33 |
1 files changed, 33 insertions, 0 deletions
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 |