Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Completion batch #2: Misc. trivial fixes
- X-seq: zsh-workers 42211
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Completion batch #2: Misc. trivial fixes
- Date: Thu, 04 Jan 2018 00:40:25 +0100
- Authentication-results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1515022828; bh=jdFure6YtN3lDf/WPp8h1IPLPfyMB2GSwhfFVI5QZP0=; h=From:References:To:Subject:Date:From:Subject; b=tlECXW1LtMNLlZqpFsQqLCO94TpkUQbowDUqaeveORJWkjwuDs2Q+MkxqQuG8nRCq5iTx/uyXJHW+HMo260/0et6y/vzzjWFwPZYAXZOybjC2MwP8ckv8U9vnv6SfJdbb0TplduC57zhhtJcSzio693yVz7avlYX6jblPdTumu6b4WMAjvjLX/2HrrvLHaIpo5wdjI9qqWh3kWVW2p8k0qJzUGSx10jTSAXAcLE2u7RzxDnkEGNwDR3hFfz+IdTzzKcMitgNBEPbhXoVmlvyqawpGrityoP/ajKW4P/Wl30f/1Tvh6wizA8pa+Gij3Qcele/Dr/EH29nLiWzYMdcxw==
- In-reply-to: <289FC0FD-FDAB-4575-8882-E9F8F3FFE4C5@dana.is>
- 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: <289FC0FD-FDAB-4575-8882-E9F8F3FFE4C5@dana.is>
dana wrote:
> 2. I updated `expand` and `unexpand` completion to account for numeric options
> as in `expand -4` (instead of `expand -t4`); most variants support this. I
> +# Most (un)expand variants, excluding BusyBox, allow e.g. -4 instead of -t4
> +[[ $_cmd_variant[$service] == *busybox* ]] ||
Digging around in $_cmd_variant is essentially looking into the
internals of _pick_variant. The documented interface is to use the -r
option to _pick_variant. Also, it is not saving the full output of
expand --version, it will either have the value "gnu" or "unix". This
needs to do something like:
local variant
_pick_variant -r variant gnu="Free Soft" busybox=busybox unix --version
> +args+=( '!(-0 -1 -2 -3 -4 -5 -6 -7 -8 -9 -t --tabs)-'{0..9} )
Given that these are hidden options, excluding other numeric options is
pointless. It is also arguably wrong because the tab width can be more
than 9 characters wide: e.g. expand -20 is valid.
I've applied the patch in full because it is probably easier that way.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author