Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH 4/4] _normal: Add -P to reset precommands
- X-seq: zsh-workers 44205
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH 4/4] _normal: Add -P to reset precommands
- Date: Tue, 2 Apr 2019 21:01:41 -0500
- 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==
- In-reply-to: <dcc89fff-413a-441e-8f27-15ed4c0fabae@www.fastmail.com>
- 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>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20190402031310.GA60178@CptOrmolo.darkstar> <233414EF-D68C-4829-B2CC-A9841DCFCF2B@dana.is> <dcc89fff-413a-441e-8f27-15ed4c0fabae@www.fastmail.com>
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 <phy1729@xxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author