From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] Completion batch #2: Misc. trivial fixes
Date: Thu, 04 Jan 2018 00:40:25 +0100 [thread overview]
Message-ID: <18174.1515022825@thecus.kiddle.eu> (raw)
In-Reply-To: <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.
next prev parent reply other threads:[~2018-01-03 23:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-03 21:29 dana
2018-01-03 23:40 ` Oliver Kiddle [this message]
2018-01-04 0:03 ` dana
2018-01-04 11:47 ` Oliver Kiddle
2018-01-04 16:05 ` dana
2018-01-06 6:11 ` dana
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=18174.1515022825@thecus.kiddle.eu \
--to=okiddle@yahoo.co.uk \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).