1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

37100: update for sysctl completion

This commit is contained in:
Matthew Martin 2015-11-12 22:44:02 -06:00 committed by Peter Stephenson
parent 78abc72f64
commit d590646673
2 changed files with 12 additions and 7 deletions

View file

@ -1,3 +1,8 @@
2015-11-26 Peter Stephenson <p.stephenson@samsung.com>
* Matthew Martin: 37100: Completion/Unix/Command/_sysctl:
updates.
2015-11-25 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Config/version.mk: 5.1.1-test-2

View file

@ -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