-
Notifications
You must be signed in to change notification settings - Fork 59
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
-cword stopped working #257
Comments
Same issue here on my mac. It works on Windows though. |
just for the record I ended up using this for now: noremap <c-g> :execute "Grepper -noprompt -query " . expand("<cword>")<CR> |
Same issue here |
Same here |
Does anyone have a version of this I can drop in my I thought this might work, but no:
EDIT: This works:
|
I had a prod around in the plugin sources today. There's a call to As @slashmili noted, this means we end up running commands like:
instead of:
This diff seems to work, but I can't vouch for its correctness. I'm not good at lua or vimscript: diff --git a/plugin/grepper.vim b/plugin/grepper.vim
index 3552d51..9cd10e0 100644
--- a/plugin/grepper.vim
+++ b/plugin/grepper.vim
@@ -401,7 +401,7 @@ function! s:escape_cword(flags, cword)
endif
let a:flags.query_orig = a:cword
let a:flags.query_escaped = 1
- return shellescape(escaped_cword)
+ return "'" . escaped_cword . "'"
endfunction
" s:compute_working_directory() {{{2 |
It is working fine on linux with bash afaik, question would be why the |
You gotta be kidding me! I'm using fish on OpenBSD and Linux! |
@vext01 there was this change in vim and neovim related to fish and escaping vim/vim#8810, neovim/neovim#15550 May be related to that |
I use the fish shell on my mac. Seems like you're on to something. |
I've just tried with my shell set to |
NVIM version: v0.6.1
vim-grepper version: 2b93535
OS: Mac 12.3.1
git: 2.33.0
I've been using this option for a while but I've noticed it's stopped working recently:
If run this command
Grepper -cword
, I get:When I press enter, it won't match with any record
If run it again and this time, remove one set of
\
like this:it finds all the matches.
The text was updated successfully, but these errors were encountered: