Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: _os_arguments
- X-seq: zsh-workers 40161
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: _os_arguments
- Date: Mon, 12 Dec 2016 08:52:58 +0000
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=bfbWjwdrXFfPUS+ XBbEam5mS9CQ=; b=1+QyS2/20/HU2dYzs5KY1tUcWUL/FHenbQ6DxZLiUAoAkQH 1tv6paLnxBG/hfoQBG1YYyVlT8O/1Q+LeQVPXuxW+80ahdiQvgdO0WEqLgzTZkct wzun8KSku/Ih2hu4M9AvP3J4VkmgtDCPO5cTufgmJs3NdpIymLRP6ElujNWc=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=bfbWjwdrXFfPUS +XBbEam5mS9CQ=; b=n3pBjCdlO6sqiMDdN7w3o3qn/wbJCPrhEu2VWPyUv8y4yZ Dj5h6mcVQdDhXSDeUgyY9v70INoBasVkPGxv7ryNwhAd2Fwke7H2ONNSV5awBBXx r+8JgkQTRME6GarNQ7AnqaTpIgp2xllnVxR4lBbLbs4aYaSwi/RdjAVy9K2ZA=
- In-reply-to: <20161212052803.GA53519@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>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <20161212052803.GA53519@CptOrmolo.darkstar>
Matthew Martin wrote on Sun, Dec 11, 2016 at 23:28:03 -0600:
> +++ b/Doc/Zsh/compsys.yo
> @@ -4624,6 +4624,60 @@ are used to store the option settings in effect before the completion
> widget locally sets the options it needs. Hence these functions are not
> generally used by the completion system.
> )
> +findex(_os_arguments)
> +xitem(tt(_os_arguments )[ var(_arguments flags) tt(:) ] {var(OS selector)|var(spec)} )
Should be item(), not xitem(). The former is for all-but-the-last when
there's more than one item() heading before a paragraph.
Add a `...' at the end to indicate the {..} group is repeatable?
Eliminate the space inside the tt()?
> +This function wraps tt(_arguments) to ease completing multiple OSes with
> +differing flags. The arguments up to the first colon are passed verbatim
> +to tt(_arguments). Following arguments are either OS selectors,
> +consisting of all uppercase letters, or tt(_arguments) specs. Each OS is
> +assigned a letter (see below). If that letter appears in an OS selector
> +since the last spec (or if there is no proceeding OS selector), the
> +following specs are passed to tt(_arguments) until the next OS selector.
> +
> +startitem()
Use startsitem()? I think the 's' stands for 'short', which would be
more appropriate in this instance.
Add some linking sentence? "The following OS selectors are available:".
The text implies unknown OS selectors are silently ignored, which is
good for forwards compatibility (completion functions running on an
older zsh than they target).
> +item(tt(S))(
> +Solaris
> +)
> +enditem()
> +
> +example(_os_arguments -s : \\ \
> + '-n[number all output lines]' \\ \
> + '-u[do not buffer output]' \\ \
> + '(-)*:files:_files' \\ \
> + N '-B[use specified buffer size]:buffer size:' \\ \
> + F N '-l[set a lock on the stdout file descriptor]' \\ \
> + DFMNO '-v[display non-printing chars as ^X or M-a]'
> +)
Missing ')'. Also, consider adding a prose description of what the
example code does.
The yodl looks good; haven't reviewed the functions.
Cheers,
Daniel
> findex(_parameters)
> item(tt(_parameters))(
> This is used to complete the names of shell parameters.
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author