New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grep drop-down auto-complete is not behaving properly when pattern is not defined yet #896
Comments
Check modules/completion/init.zsh for a line that may be causing it. |
I see nothing unexpected here. If you take a vanilla Zsh without Prezto, run If you look at the definition of arguments=(
'(-e --regexp -f --file)1: :_guard "^--*" pattern'
'*:files:_files'
) Along with a whole lot of optspecs. So, as you can see,
And _guard "^--*" pattern insists that the pattern matches
More information in Now it's a separate and perhaps interesting question as to why the pattern in |
Interesting. I migrated from oh-my-zsh to prezto so perhaps I'm used to a different behavior. |
Thank you, @zmwangx. |
I switched to prezto just today so I'm not sure if this behavior is a bug or it's by design. When I do
grep -
andtab
I haveI expect with
double tab
the cursor jumps to the options and I be able to navigate options with arrow keys. But this doesn't work. Instead if I dogrep 'my pattern' -
and doubletab
, now it behaves the way that I expect. Note that in this case there is no empty group for-- pattern --
.I'm used to provide the options first, and then the pattern. Is there any work around?
The text was updated successfully, but these errors were encountered: