From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15733 invoked by alias); 27 May 2018 19:26:34 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42868 Received: (qmail 3546 invoked by uid 1010); 27 May 2018 19:26:34 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(-1.4/5.0):. Processed in 1.321601 secs); 27 May 2018 19:26:34 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,SPF_PASS,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=nCMO=IO=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1527448577; bh=R5H+y/rW3vtJa2amDrzOMt0gicXLXlrwmlq9vz4u53w=; h=From:References:To:Subject:Date:From:Subject; b=bNl9G4PpaM6pbxsLe+wX09I0EH1kdKEhQz1xU+n5v8A8lboE1Z20gAaUAluB63ERVEL8eKVVJHrKyWdrGOu6shQDMiaiS4y6LZjf2dFnbXxZJRnxUOGJ0cwYMZ/sYeSCwFRQ+766zgy9HJxAuu6ul/wbTYZChuH6KjHwtNR4ApuBwy66vsQpYrpdyqJrB+xoTozo0u+vLNmnjymfrUtMGPpHU+BFSLfySd5FS+CpFXubI2XQYv0vr7ro/pOD+tszf3d+TC4hYGI6mf/Oc3r6HgLrCeHAGZlA81qqV6m9My2x3RrDgSIW/FUjoe5BIeH1+ILX/vvcjuAhAYp9LA4H2A== X-YMail-OSG: 6n_Sj4IVM1k54fEGT3QgNTlRP_YZn.54GYK3vwyNUR5Gsh7U.uKuWfsEs3Aqu9r W0qkfbBM096MsD3744fYxThy5Z4GY_VCmFTiYqhuWZIprhzde6DGOCUwQL7VJwZzLKkepKOFuXb5 xkbh_DNLJIZBExDbRXz_lJTWgIYU4N2jpE7dBRhkldEpTZdybFRtdIKP48KTs0QIyrqLeaAEPHYX T0hfOLIG2ydSipksQByroK2trSmgusf767myvpo2tuOe74tBY9S76uTZW4nkG5EFEIKDEQ4EUewA MIdMTB7jCZ0uJt0UWkazJk2PR1fTKzOrQRvaQ.kPWFijAPD_P03v5Hh0bCJEHVTHC0WsA3IhPsoI cM63RM2g.tLIQltOV9m5JBYUiJIas78rewpndKqAOhK5ASMau.HEuIJKwmuQlRMF7SnJYbcgnu4q 1RbbjCL_Twu.W_wmTHD4sN7AljX6cCE6Wnh7LKGpwFglHty2l0j57y2b5rlhVtrjfmISMR4i3bJg lcahmHyG8dIOlDd4Rl0H77hP.2e5BHlX_bWpBbKUVmEdjnpl.P8MiyuRmMOtZcsZ8beNqdkWwimW mzbFkPklveF3T2RdUx5aFhMbGeehcNwRLQie1iLia2plYPRitklpCLzHEDU8046zOGPhh_zqKRiA uG.U3H3jQ2k2SS9i_j5byUH4- cc: zsh-workers@zsh.org In-reply-to: <20180526070821.8661-1-lists@eitanadler.com> From: Oliver Kiddle References: <20180526070821.8661-1-lists@eitanadler.com> To: Eitan Adler Subject: Re: [PATCH] _powerd: add -M and -m options MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4029.1527448571.1@thecus> Date: Sun, 27 May 2018 21:16:11 +0200 Message-ID: <4030.1527448571@thecus> Eitan Adler wrote: > allowed values, limiting to numbers is good enough for now. > > Signed-off-by: Eitan Adler > --- > Completion/BSD/Command/_powerd | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Completion/BSD/Command/_powerd b/Completion/BSD/Command/_powerd > index 18a9fb437..88d7c401b 100644 > --- a/Completion/BSD/Command/_powerd > +++ b/Completion/BSD/Command/_powerd > @@ -6,6 +6,8 @@ _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[maximum frequency to throttle down to]:freq: :_guard '[0-9]#' 'numeric value'" \ > + "-M[maximum frequency to throttle up to]:freq: :_guard '[0-9]#' 'numeric value'" \ The syntax here isn't right as the : : in the middle should not be there. The second argument after -m or -M will give you the whole _guard bit as a description. What did you intend as the description? Abbreviating the word "frequency" to "freq" is fairly pointless and "numeric value" is not entirely helpful. "frequency" is better. Better still, include the units in round brackets and the default value in square brackets. _guard is not necessary here. _guard solves a particular problem that occurs when something that can't be completed but for which a message is useful is completed alongside something for which there are matches. After -m, only arguments to -m are relevant so _guard isn't needed. Assuming the units are MHz, this leaves something like: '-m[maximum frequency to throttle down to]:frequency (MHz)' Oliver