From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh workers <zsh-workers@zsh.org>
Subject: PATCH: improve powerd completion
Date: Sun, 11 Nov 2018 02:50:34 +0100 [thread overview]
Message-ID: <48341-1541901034.874099@A9qI.1zkh.JjH_> (raw)
powerd doesn't require a space between options and their arguments so we
should use a '+' after the options in the _arguments specs. This patch
also adds units and default values in a few cases.
Oliver
diff --git a/Completion/BSD/Command/_powerd b/Completion/BSD/Command/_powerd
index 05c03ab15..c64abb5bc 100644
--- a/Completion/BSD/Command/_powerd
+++ b/Completion/BSD/Command/_powerd
@@ -3,13 +3,13 @@
local powerd_mode
powerd_mode=(minimum maximum adaptative)
_arguments -s \
- "-a[mode to use while on AC power]:mode:($powerd_mode)" \
- "-b[mode to use while on battery power]:mode:($powerd_mode)" \
- '-i[CPU idle percent level when begin to degrade performance]:percent:' \
- '-m[minimum frequency to throttle down to]:frequency (MHz)' \
- '-M[maximum frequency to throttle up to]:frequency (MHz)' \
- "-n[mode to use normally when the AC line state is unknown]:mode:($powerd_mode)" \
- '-p[polling interval (in milliseconds) for AC line state and system idle levels]:interval:' \
- '-P[alternative pidfile]:pidfile:_files' \
- '-r[CPU idle percent level where to increase performance]:percent:' \
- '-v[verbose mode]'
+ "-a+[mode to use while on AC power]:mode:($powerd_mode)" \
+ "-b+[mode to use while on battery power]:mode:($powerd_mode)" \
+ '-i+[CPU idle percent level when begin to degrade performance]:percent [75]' \
+ '-m+[minimum frequency to throttle down to]:frequency (MHz)' \
+ '-M+[maximum frequency to throttle up to]:frequency (MHz)' \
+ "-n+[mode to use normally when the AC line state is unknown]:mode:($powerd_mode)" \
+ '-p+[polling interval for AC line state and system idle levels]:interval (ms) [250]:' \
+ '-P+[alternative pidfile]:pidfile:_files' \
+ '-r+[CPU idle percent level where to increase performance]:percent' \
+ '-v[verbose mode]'
reply other threads:[~2018-11-11 1:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=48341-1541901034.874099@A9qI.1zkh.JjH_ \
--to=okiddle@yahoo.co.uk \
--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).