From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28502 invoked from network); 27 Aug 2021 14:45:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 27 Aug 2021 14:45:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1630075514; b=HgfoFH1Dphdc4AdlMHzqWREzv0t/ee3ujCRWI8dTeixl9zOzr9QreGXAB5cKlC9+qTiZXn75QM BFV2KQRZ5PzJrN2AkCbRMnBCszCpFw+RDzDmhUNjCjADBJiCGQgiat+ue44x9slUDc0SkdeJl1 uXeoRvvpqmQHWKa4JXDC05EEjA49g/Ny/8OtS5K6K7FGGXh5lUNFqzcxP9rQVrUWNforZJgB7J 6MFlvC4o3Uhpu1iHEgJRnVUI3txgdQCfxeYu541OziFeQA4n+wVmIDx4IEK+XOytQruqqMwttE eso1ZhzTtHTh4nroiaLJArr6L/bu42XuvlewFaCJfLh65Q==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-vs1-f53.google.com) smtp.remote-ip=209.85.217.53; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1630075514; bh=AsLDwB+mBprpe1tLiBAAktjMcBNaqOIn1/37LAOm5sM=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:References: In-Reply-To:MIME-Version:DKIM-Signature:DKIM-Signature; b=Wsl6281q4hzOido6qrxoDxNoFvV8Un1N2NKYZNpUFDPfrR+PgruYXMlVZ0x8lYYNew9bXkvaFv WXow8o9b8+Kp2sqalXTmC9xwxOvy4OeLqXyZOExhVt5OI9uU5qW47xo8tYC0CHQn57+zbT2bD5 orrMdEfjpbxWtvzG1yfrWvu0sP337f620DFDPlvwFVmHW4aSIJKfpq3b9xjElQ7vg4cNPCj60L MZyEqhWwzeOu5jCBPdyxelYzkwteoFYp1P11QKBfdvdBhn82oc9/kuy1zNMnSGXrXrEH2XwlE8 nvPRmQqLu4XOgBbl8pJyzlhe8+RxL0rbgA6mZm1iKQ33tg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:References:In-Reply-To:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=StVySEGyPXgcmiuOHeu6GM4Sv9/hdate8oJaA/M+eD8=; b=qRPr22ewbWMo+C6LMeocyurbN7 H5aHOKU2Y34EISbnbZ2arRHipu+BTT7Dkih1YIAfUAVif55CS4TAuKmVHgGxZX/t8hIzZdgprBi/J 5Vwjwe/27dLPyxmVvncgZRFYCKyzmokxue2eSPojSfNEnqWMNd9JE7B6APYoTmMqvH/EpTmacB5E1 J9A6r840tW3OQejzIO6Fwnwemb/NMEGjBSJoCeND2Ci4KFFsdmHYnWoaOzIbtSVYBx5rkGhugtBpZ +a0/wUjCBPoq8vxKiBpJo7cL9FqmhpGLCLz6iX6rgmzZurEVSd5e3MJnogquIvKlOk9Blwdb3edWc Lc4M7AqA==; Received: from authenticated user by zero.zsh.org with local id 1mJd6X-000IaO-JK; Fri, 27 Aug 2021 14:45:13 +0000 Authentication-Results: zsh.org; iprev=pass (mail-vs1-f53.google.com) smtp.remote-ip=209.85.217.53; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-vs1-f53.google.com ([209.85.217.53]:37720) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mJd6D-000IGm-Vm; Fri, 27 Aug 2021 14:44:54 +0000 Received: by mail-vs1-f53.google.com with SMTP id i23so4750580vsj.4; Fri, 27 Aug 2021 07:44:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=StVySEGyPXgcmiuOHeu6GM4Sv9/hdate8oJaA/M+eD8=; b=vhcofMHu8pQNWEqt2aSP+B27GBexcm6PliyOFbvGdbvW+TkKCFgeEFkkqp1gGN6PUm 6SejD3tSvbCr2lCjSttHlclKMxjcGyfps786VndllYThp4eW7NoBNXOtRafvqZmg8SXn 7+zj/SKk5w+2EOvIpret5SLr1doyvXV0z822fHPrRUSkXpnAius3FrxZdvNOvoRgMmVy zPdqgsyDLDkwr1Kv1ObXzhdmC1OTokhjDtkXEgzxZUKAMZrwnojfp8vVRwN2myucIRkR 8UHF+7fD6iQIpC8GYK4Ihf2U8YkIQyX+pJsteAGnKcXwOh6jLp987f8tT23b2hc3o66R E7Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=StVySEGyPXgcmiuOHeu6GM4Sv9/hdate8oJaA/M+eD8=; b=c9HKaBeIV65xFReyNcGZKzRnPJRPOf/mXokthE4MSuQnRNFtgFtmSQT5ksI09nhNcz kNAQy0/ost324LcFTWgk0X4xgGZMjrxojlDR++FOS+jat9pNujRpXZ9pkjjoPa6LwZWo HxPvH9+RD9UBkOuWN1JgpFjvi4hAQxSUhWFCnaGQQp1sScURr1cnJuKJBu5cHfm3qFBU umfOjgQoaxSvEL+so2Im7sVOJ7dRfpZaQMvJ/hifGnPkpUcbJ+YcMoOTFXDkPlUdIgTw knUpGHxBYcWlKMxw+3uuUpY5dh6tJYnxVX6B5zaGPVPhcBGqQCE80mHI2bbE/KTRNqxW uk/g== X-Gm-Message-State: AOAM531hEuJ0CiDaQMA8fQSCR8rlncFEufOmOmMd433Kqa6vKeeRFDvv jHUCWeyJeQ6eEzx4VcJjMqk+rw2svzDBMEBGnDONGWKu X-Google-Smtp-Source: ABdhPJw2AENeXz6xU33Sn0NfYFiB4s5oR3jqvrwRoo2WkmmzXlEApgYWr6Cq/DMDMPeSlKDC3Zuh+Te41uprDODgXaM= X-Received: by 2002:a67:ce02:: with SMTP id s2mr7169483vsl.29.1630075492749; Fri, 27 Aug 2021 07:44:52 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab0:60b2:0:0:0:0:0 with HTTP; Fri, 27 Aug 2021 07:44:51 -0700 (PDT) In-Reply-To: <73806-1630065135.858692@atah.qJX1.Jyyu> References: <73806-1630065135.858692@atah.qJX1.Jyyu> From: Mikael Magnusson Date: Fri, 27 Aug 2021 16:44:51 +0200 Message-ID: Subject: Re: PATCH: list units in brackets at the end of completion group descriptions To: Oliver Kiddle Cc: Zsh workers Content-Type: text/plain; charset="UTF-8" X-Seq: 49321 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 8/27/21, Oliver Kiddle wrote: > Continuing with the bulk completion fixups for single issues, this > applies the convention of units in round brackets at the end of the > per-group descriptions just before the defaults I was adding in 49156 > in square brackets. There aren't so many here because this is harder to > grep for and we mostly already do this consistently. For anyone writing > completions (or --help output), I'd recommend always considering units > and defaults because it's not always obvious. > > There might be some more useful way we might indicate where suffixes can > be appended to a value to denote units. Completing them after a number > doesn't really make the options clear before a number has been entered. > Perhaps an initial slash, e.g. 'timeout (seconds) [5] /ms /us /ns' > > As I've alluded to before, with consistent forms, _description could > parse these and allow formatting for these components to be configured. > But how often do we put random comments in brackets in descriptions or > other things that would break this? Yet more backslashes will be ugly. > > Oliver > > diff --git Completion/Debian/Command/_dak Completion/Debian/Command/_dak > index 8ecfd84b3..9976c7371 100644 > --- Completion/Debian/Command/_dak > +++ Completion/Debian/Command/_dak > @@ -207,7 +207,7 @@ case $cmd in > > (poolize) > args+=( > - '(-l --limit)'{-l,--limit=}'[only migrate amount of packages]:amount in > kb:' > + '(-l --limit)'{-l,--limit=}'[only migrate amount of packages]:amount > (kb)' > '(-n --no-action)'{-n,--no-action}'[do not do anything]' > '(-v --verbose)'{-v,--verbose}'[explain what is being done]' > ) > diff --git Completion/Mandriva/Command/_urpmi > Completion/Mandriva/Command/_urpmi > index 9ab9e45b7..be6350129 100644 > --- Completion/Mandriva/Command/_urpmi > +++ Completion/Mandriva/Command/_urpmi > @@ -73,7 +73,7 @@ _urpmi() { > > opts_net=( > "($help --wget)--curl[use curl to retrieve distant files]" > - "($help)--limit-rate[limit the download speed (b/s)]:download speed in > b/s: " > + "($help)--limit-rate[limit the download speed]:download speed (b/s)" > "($help)--proxy:proxy host:_hosts" > "($help)--proxy-user:proxy user:_users" > "($help --curl)--wget[use wget to retrieve distant files]" > diff --git Completion/Unix/Command/_dropbox > Completion/Unix/Command/_dropbox > index 115f9eb45..45c77ae09 100644 > --- Completion/Unix/Command/_dropbox > +++ Completion/Unix/Command/_dropbox > @@ -55,8 +55,8 @@ else > > (throttle) > _arguments \ > - '2:download limit in KB/s:(unlimited)' \ > - '3:upload limit in KB/s:(unlimited)' > + '2:download limit (KB/s):(unlimited)' \ > + '3:upload limit (KB/s):(unlimited)' > ;; > > (*) some inconsistencies here with kilos and bytes, it should always be kB although I doubt anyone would ever think kilobits or kelvinbytes are refered to in these contexts. The urpmi one should probably be spelled out as bytes/s or B/s though (somehow it feels less clear to me without the kilo). Perhaps worth a separate batch cleanup. -- Mikael Magnusson