Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [patch] sysctl update for OpenBSD
- X-seq: zsh-workers 37218
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [patch] sysctl update for OpenBSD
- Date: Wed, 25 Nov 2015 22:27:29 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ePFihua7QSfDKa3MJTQQwKI4gExchnrjm48+CoIIDjo=; b=Vs/+qitpbvmLmNBojsNycJig67esh2sLxjbQh0K+aNwzrDuJh+HjtieTSl0j33/Jou ZRo1ElOaVHzKcgD3YYU2KcVxBMZwIFDVJQjs0eszq3aizsu7dU653SmIyh73z4E1pEDt 0/ejIHy5T2qV6UKkXSOEWSJ3Tl9GcQi6TIQC4gF/YDnNFzK1/zAm69bJTin/fPo3NbGu Z8wWK5ortV7dXu9Jy65wIaOXQ3k2qC5PFObf9Ajq2bB26Hkqt5ZdnFpFgzsJ5OZvC4xl h6kLNd1fhPi+ZtyJ5xqDjvRUJimTm4gFNrrgtW/tb2sCJsZuQJ59hv46qUEOgZKaIagv Ipjw==
- In-reply-to: <20151113044402.GA24499@CptOrmolo.darkstar>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20151113044402.GA24499@CptOrmolo.darkstar>
ping?
On Thu, Nov 12, 2015 at 10:44 PM, Matthew Martin <phy1729@xxxxxxxxx> wrote:
> -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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author