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 44203
- From: dana <dana@xxxxxxx>
- To: Matthew Martin <phy1729@xxxxxxxxx>
- Subject: Re: [PATCH 4/4] _normal: Add -P to reset precommands
- Date: Tue, 2 Apr 2019 12:45:56 -0500
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Jb2DcKzcEcNpuQ/9kDfoHOBZ4dT5HZBu7Dqw2YFX3Hc=; b=wiwcgOqfoUc/Brbo9r8WBpwL4CVZVMomXWR3mKDXJl/zZDTylU5/tcrQm03hAnSRVn LLNOt42egUMbbQcfJsWpOPbi4pGDRgN4mwL5H+7fWOYSeu5TMWppGmI815K8XfEIXgBH wogMm/WxQrELmtk4xkGzsUZEaGkyrPhCDl/rkruLkVyfIejpUukyLmVQbbBIrKNeZiRD fbYK+ogETWpVXcfPcGnk7agJH+LqcicZhhbmeVtjIllzLolCm9s3WuMFwsMHe9VBSZSr Fs6FVmNspj82AkliRPQ8iG5wxrKbynq4H8DBSZGdERxY2TOn87cF+wUuHuI5X/BIs7fQ e+eA==
- In-reply-to: <20190402031310.GA60178@CptOrmolo.darkstar>
- 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
- References: <20190402031310.GA60178@CptOrmolo.darkstar>
On 1 Apr 2019, at 22:13, Matthew Martin <phy1729@xxxxxxxxx> wrote:
>Add the ability to reset the precommands array to empty. Will be useful
>for zsh -c and perhaps some other situations. Again the texi is
>cargo-culted.
I like it. The documentation looks mostly OK to me, but:
>+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.
> 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?
>+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.
>+ '*::arguments: _normal -p $service'
The 'arguments' here is superfluous.
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,
_fakeroot, _nice, _stdbuf, _timeout, &c. _env is kind of a special case,
though, in that it (ab)uses _normal's standard behaviour to provide
variable-assignment completion too. Maybe there's a general solution for that
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author