Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A weird bug of grep completion
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@xxxxxxxxxxxxxxxxxx>, wrote:
> Joey Pabalinas wrote on Fri, 27 Jul 2018 16:34 -1000:
> > On July 27, 2018 4:28:27 PM Joseph Lee <cgjosephlee@xxxxxxxxx> 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.
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author