Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: improve powerd completion
- X-seq: zsh-workers 43813
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh workers <zsh-workers@xxxxxxx>
- Subject: PATCH: improve powerd completion
- Date: Sun, 11 Nov 2018 02:50:34 +0100
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1541901036; bh=ed1omhM4jhdvsLAPUh/RmeYNC8oKJ9l/EgLe+1gmHy4=; h=From:To:Subject:Date:From:Subject; b=Lv7I2zZXcRSC1QYrM1H+nC6frLwHnQYYaXAcoV9UAPkrVEccI+CsHnMalUszEh8+THuR8cYteco4z/CUli7+8+4LicBD/7yZuas9fUMSWOwuBa5u+vUs6S/lX0n86Q4a8GciJoHyN4bJ4WJo+l7P6kS/l/WDuAu67oJgrtx1wE2nkEk3M3x4n0pzsyTomfSojrzQfoLuSEfKVWaFV9CQRUzlE0BlpmAnh4MqnWmAa+DIZWnIdm4Lwh2N9Wns8pzSp7krlZnU4R9KHrAUZBP+OUcVA95eB9xH5tyeV6FXK4wEqXtI57FowPtnxh9c2lMW++6CW7lntsuqlhPQSwqSMQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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]'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author