From: m0viefreak <m0viefreak.cm@googlemail.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: zsh-workers@zsh.org
Subject: Re: [PATCH 3/4] _git: log: ignore numeric options
Date: Thu, 17 Mar 2016 00:00:02 +0100 [thread overview]
Message-ID: <56E9E572.2050000@googlemail.com> (raw)
In-Reply-To: <20160316223932.GA31897@tarsus.local2>
> Using '_arguments -A' breaks «git log origin -<TAB>», which is a valid
> syntax.
Oh. Thats's not good.
> How about adding 10 options, -0 through -9, which each take an optional
> argument that must be in the same word? That is:
> .
> _arguments : '-'{0..9}'-[lorem ipsum]: :_guard "[0-9]#" "numeric value"'
> .
> ?
That is probably the "correct" solution. I wanted to do something like that
initially, but I noticed that it pollutes verbose menu completion a lot:
Completing: option
-- -- start file arguments
-9 -8 -7 -6 -5 -4 -3 -2 -1 -0 -- lorem ipsum
--abbrev -- set minimum SHA1 display-length (for use with --abbrev-commit)
--abbrev -- set minimum SHA1 display-length
--abbrev-commit -- show only partial prefixes of commit object names
--after --since -- show commits more recent than given date
--all -- show all commits from refs
...
So instead I went with -A. But I didn't notice that side effect above.
Using no description at least puts them at the end, but it's still ugly:
...
--topo-order -- display commits in topological order
--unified -U -- generate diff with given lines of context
--use-mailmap -- use mailmap file to map author and committer names and email
--walk-reflogs -g -- walk reflog entries from most recent to oldest
--word-diff -- show word diff
--word-diff-regex -- specify what constitutes a word
-z -- use NUL termination on output
-0 -1 -2 -3 -4 -5 -6 -7 -8 -9
next prev parent reply other threads:[~2016-03-16 23:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-13 22:01 [PATCH 0/4] A few patches to _git m0viefreak
2016-03-13 22:01 ` [PATCH 1/4] _git: reflog: complete references next to commands m0viefreak
2016-03-15 0:08 ` Daniel Shahaf
2016-03-13 22:01 ` [PATCH 2/4] _git: fix tag name of remote branches m0viefreak
2016-03-15 0:08 ` Daniel Shahaf
2016-03-13 22:01 ` [PATCH 3/4] _git: log: ignore numeric options m0viefreak
2016-03-15 0:08 ` Daniel Shahaf
2016-03-16 20:43 ` m0viefreak
2016-03-16 22:39 ` Daniel Shahaf
2016-03-16 23:00 ` m0viefreak [this message]
2016-03-13 22:02 ` [PATCH 4/4] completion: _git: diff: add --no-index m0viefreak
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=56E9E572.2050000@googlemail.com \
--to=m0viefreak.cm@googlemail.com \
--cc=d.s@daniel.shahaf.name \
--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).