zsh-workers
 help / color / mirror / code / Atom feed
From: Joseph Lee <cgjosephlee@gmail.com>
To: Joey Pabalinas <joeypabalinas@gmail.com>,
	zsh-workers@zsh.org,  Daniel Shahaf <d.s@daniel.shahaf.name>
Subject: Re: A weird bug of grep completion
Date: Mon, 30 Jul 2018 11:39:26 +0800	[thread overview]
Message-ID: <4af99243-5eef-47ee-8741-33ddad4e79c6@Spark> (raw)
In-Reply-To: <1532764465.1091676.1455614720.39F6E608@webmail.messagingengine.com>

[-- Attachment #1: Type: text/plain, Size: 1500 bytes --]

Suplemnt previous report: the bug happens only when `--no-group-separator` after `--no-messages` or `--no-filename` arguments, even the short form `-s` and `-h`do the same behavior.

Best,
Joseph
On Jul 28, 2018, 3:54 PM +0800, Daniel Shahaf <d.s@daniel.shahaf.name>, wrote:
> Joey Pabalinas wrote on Fri, 27 Jul 2018 16:34 -1000:
> > On July 27, 2018 4:28:27 PM Joseph Lee <cgjosephlee@gmail.com> wrote:
> >
> > > Dear all,
> > > I'm using macOS 10.13.6, zsh 5.5.1 (x86_64-apple-darwin16.7.0) and grep (GNU grep) 3.1 packaged by Homebrew.
> > > A weird behavior happened when completing `grep --no-*` arguments.
> > > While typing `--no-group-separator`, which is a GNU only argument, after another `--no-*`, the cursor stoped in a wrong place and unable to finish completion. But it works right when `--no-group-separator` goes ahead.
> > >
> > > Words might not be clear, so here's a demo video:
> > > https://streamable.com/bxbdv
> > >
> > > I would appreciate any ideas, thank you.
> >
> > You ended up with your cursor one to the left of a - (you can see it
> > within the block cursor) and that would cause completion to behave a bit
> > oddly depending on setopts.
>
> To clarify: the bug report is that «grep --no-filename --no<TAB>» appends
> a hyphen to $BUFFER but leaves $CURSOR as it was, after the second "--no"
> rather than after the newly-added hyphen.
>
> There's no option whose name is of the form /^--no[^-].*/, so this does seem to
> be a bug.
>

  reply	other threads:[~2018-07-30  3:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-28  2:28 Joseph Lee
2018-07-28  2:34 ` Joey Pabalinas
2018-07-28  7:54   ` Daniel Shahaf
2018-07-30  3:39     ` Joseph Lee [this message]
2018-08-02 14:09 ` Jun T.
2018-08-16  8:20   ` Jun T
2018-08-16  9:02     ` Peter Stephenson

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=4af99243-5eef-47ee-8741-33ddad4e79c6@Spark \
    --to=cgjosephlee@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=joeypabalinas@gmail.com \
    --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).