-
Notifications
You must be signed in to change notification settings - Fork 49
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
dwim operations with grep -rnH do not work #95
Comments
pierre-rouleau
changed the title
dwim operations with grep -rnH does not work
dwim operations with grep -rnH do not work
Jan 11, 2023
bling
pushed a commit
that referenced
this issue
Jan 11, 2023
* Describe dwim with grep limitation. +1 optimization. * Add fzf-find-in-buffer (by LiuYinCarl) Add fzf-find-in-buffer originally proposed by LiuYinCarl in #94 I modified the proposed code a little to adapt to the current code and added protection against trying to search in a buffer that is not visiting a file, an prompt to save the buffer if it has been modified. * Fix issue #95: dwim with grep A work-around fix for dwim operations using grep. When a FZF grep with specified text is executed, a file pattern of " *" is automatically appended to the grep command, allowing the operation to proceed.
The latest pushed code fixes the issue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I wonder if something broke recently or if that ever worked, but when one of the
fzf-grep-dwim
orfzf-grep-dwim-with-narrowing
is used whilefzf/grep-command
uses grep (as opposed to rg) the operation does not work.The reason it does not work is the grep command requires a file pattern to search otherwise it searches from its stdin. The 'dwim' commands provide a pattern that the command can append to
fzf/grep-command
but grep does not see any file pattern. So the grep operation fails. If we changefzf/grep-command
to use rg (ripgrep) then it works because ripgrep recusively searches all files (except the hidden ones) by default.So... I wonder... Did these dwim commands ever worked with 'grep -rnH' , or did I break something?
@bling, do you know?
The text was updated successfully, but these errors were encountered: