From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: [patch] sysctl update for OpenBSD
Date: Thu, 12 Nov 2015 22:44:02 -0600 [thread overview]
Message-ID: <20151113044402.GA24499@CptOrmolo.darkstar> (raw)
-w hasn't been a valid flag since 4.2 so it should be safe to just kill
it ;). The :# * bit in _cache_sysctlvars is because kern.version has
a newline in it's value.
- Matthew Martin
diff --git a/Completion/Unix/Command/_sysctl b/Completion/Unix/Command/_sysctl
index ff3312f..9d9e8b9 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
next reply other threads:[~2015-11-13 4:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-13 4:44 Matthew Martin [this message]
2015-11-26 4:27 ` Matthew Martin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151113044402.GA24499@CptOrmolo.darkstar \
--to=phy1729@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).