summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_sysctl
diff options
context:
space:
mode:
authorMatthew Martin <phy1729@gmail.com>2015-11-12 22:44:02 -0600
committerPeter Stephenson <pws@zsh.org>2015-11-26 09:37:50 +0000
commitd590646673007c4f750bbd4a481e5574a31d2b64 (patch)
tree3996ac98026e3f88b8a5dfd014e76ffd2a8303d4 /Completion/Unix/Command/_sysctl
parent78abc72f64b03d675922f9a958fdf5d6aa32ab67 (diff)
downloadzsh-d590646673007c4f750bbd4a481e5574a31d2b64.tar.gz
zsh-d590646673007c4f750bbd4a481e5574a31d2b64.zip
37100: update for sysctl completion
Diffstat (limited to 'Completion/Unix/Command/_sysctl')
-rw-r--r--Completion/Unix/Command/_sysctl14
1 files changed, 7 insertions, 7 deletions
diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl
index ff3312fac..9d9e8b968 100644
--- a/Completion/Unix/Command/_sysctl
+++ b/Completion/Unix/Command/_sysctl
@@ -34,13 +34,13 @@ case $OSTYPE in
'(-n -p -a -A)*:sysctl variable:_files -W /proc/sys'
;;
openbsd*)
- : ${(A)_cache_sysctlvars:=${${(f)"$(sysctl -a)"}%% *}}
- _arguments -s -A "-*" \
- '(-w -A *)-a[list all string and integer variables]' \
- '(-w -a *)-A[list all known variables]' \
- '(-w)-n[show only values]' \
- '(-a -A -n)-w[write variable]' \
- '(-a -A)*:sysctl variable:_multi_parts ${words[(r)-w]:+-S=} -i . _cache_sysctlvars'
+ : ${(A)_cache_sysctlvars:=${${${(f)"$(sysctl -a 2>/dev/null)"}%%=*}:# *}}
+ _arguments -S -s -A "-*" \
+ '(-A -q *)-a[list all string and integer variables]' \
+ '(-a -q *)-A[list all known variables]' \
+ '-n[show only values]' \
+ '(-a -A)-q[suppress all output when setting a variable]' \
+ '(-a -A)*:sysctl variable:_multi_parts -i -S = -q . _cache_sysctlvars'
;;
*)
_default