From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id e0435721 for ; Wed, 3 Apr 2019 02:02:35 +0000 (UTC) Received: (qmail 23972 invoked by alias); 3 Apr 2019 02:02:21 -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: 44205 Received: (qmail 12691 invoked by uid 1010); 3 Apr 2019 02:02:20 -0000 X-Qmail-Scanner-Diagnostics: from mail-ot1-f66.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.1/25405. spamassassin: 3.4.2. Clear:RC:0(209.85.210.66):SA:0(-1.7/5.0):. Processed in 3.164534 secs); 03 Apr 2019 02:02:20 -0000 X-Envelope-From: phy1729@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.210.66 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=apBunXnn9XRPZFOcTC0SZXdJ/5hD2kQdiHgTYxAAHV0=; b=kIaCW54+BtJlFxvy27dCPy9hHIpavUNIfiYmVfneuBPzDU3Taa74JKWLoheVrygjR6 ail6ew+s9Vo6pKKE5Me4KcPTQRBAHCQnb1ZvQYdpZDHj8KNyvnM+R2smEDRLr6U7f7P/ h0Af0A1H6MhzSszEPqSQ2LKtLSFcTXJjyIQlXPGJanCX24RtmhBGii8fGOe0MHsd9zI7 Y0jwJGXULJiFqiOxX7UHmFmNPrkdLAoUbQfWmUt85oEOLgrBxUvtJwQkOktd3wa6RTJ4 /66y+OJ+NDvZoL4yiNaz43cTanpfMVaPcgWGmlp9kI0Bej7q+77AuEj+bFldQnjSQGW3 CHRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=apBunXnn9XRPZFOcTC0SZXdJ/5hD2kQdiHgTYxAAHV0=; b=uMFjgW6pTJ4rcCT9I3fQ+fKGzY8C6fiBzDwwnabtO8ZXVO+eVBuCnEBE12gOfA4bpN neNmRja96Ua2qSsqrp6SNOXWXZndPSBZtXbOmvGS1s9avIKFTyrb4pl5EDa+/2DFmdBl 9HIOpDDj3ErkLyo+AYbIiJty39ZvG+7xf8OUxaI+gpMqH63oitDRQr5GoRQWAslbKP7s QVCczMyxV8xULuf4vLSaEOipJAvrBPes2UMH+7iT1t0yjtUv7RPoMQEFJSSTWkrZjgPY KR5BODk+XYmVwvUjEdnJqHCA+5S47CwWzzYWh3Lco5yTgOgbzKVKD1grHmOV/amGRBDH yhLQ== X-Gm-Message-State: APjAAAXpMBP3hGBw9iS3B9F94Mt6ElxGOMzhxyJl9hCSJJVXJSl+ihih S7xdwc5YLWXpN+V8Dnl3zAR+TlXqJrk= X-Google-Smtp-Source: APXvYqy6xkOKQBeY/tqxrzk5wMly0fXpGVavHfbbvRNHjquG/Q6ZblASVJDiFz/jMgCYwyiVD4cvrA== X-Received: by 2002:a9d:1c2:: with SMTP id e60mr32871640ote.122.1554256903812; Tue, 02 Apr 2019 19:01:43 -0700 (PDT) Date: Tue, 2 Apr 2019 21:01:41 -0500 From: Matthew Martin To: zsh-workers@zsh.org Subject: Re: [PATCH 4/4] _normal: Add -P to reset precommands Message-ID: <20190403020123.GA98420@CptOrmolo.darkstar> Mail-Followup-To: zsh-workers@zsh.org References: <20190402031310.GA60178@CptOrmolo.darkstar> <233414EF-D68C-4829-B2CC-A9841DCFCF2B@dana.is> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) On Tue, Apr 02, 2019 at 04:27:41PM -0400, Daniel Shahaf wrote: > dana wrote on Tue, 02 Apr 2019 17:47 +00:00: > > On 1 Apr 2019, at 22:13, Matthew Martin wrote: > > >+xitem(tt(_normal) [ tt(-P) | tt(-p) var(precommand) ])( > > > > I know it wasn't your fault, but i think this should be item()(), not > > xitem()(). I don't fully understand the distinction, but xitem() seems to be > > used only when there are multiple headings (describing different ways to use > > the command); left here, it breaks the man-page formatting for the paragraphs > > you added. > > There should be zero or more xitem() [with one pair of parens each] > followed by exactly one item()() [with two pairs of parens, the second > one being multiline). Thanks for the explanation. > Since I'm replying: I don't understand why `tt(foo) tt(bar) tt(baz)` is > spelled with three macros; I think`tt(foo bar baz)` would be fineā€¦ but > of course this is minor. Because _multi_parts just above does something similar (although it's alone in this file using that style). Fixed. > > > completes after pre-command specifiers such as tt(nohup), removes the > > > > Also not your fault, but this is the only place in the documentation > > (including your changes) where 'pre-command' is hyphenated. Maybe fix that? Fixed. > > >+Append var(precommand) to the list of precommands. Should be used in > > >+Reset the list of precommands. Should be used if completing a command > > > > This clipped style (ommitting the subject of the sentence) isn't used anywhere > > else in the documentation that i can see. It's used with the other helper functions that describe their options in a list (cf. _completers, _dir_sep, _email_addresses, although only -f for _path_files). I think the imperative generally results in more concise documentation for flags ("specifies that" doesn't add anything); but if the declarative is preferred, I can change the patch to match. > > >+ '*::arguments: _normal -p $service' > > > > The 'arguments' here is superfluous. Fixed. > > idk if you planned to do another pass, but i noticed several straight-forward > > examples of other functions that could make use of `_normal -p`: _env, I'm planning to review uses of _normal next. This round was just cleaning up completers that already used precommands.