failed to search for multi strings like in normal fzf #1891
Replies: 2 comments
-
You’re not understanding how grep works and the difference with live grep, both perform an underlying regex search, when you’re using grep fzf-lua asks for your regex, if you wish to not supply one you’re feeding all lines of the project for fuzzy matching. To skip the input prompt, use grep_project or supply an empty regex to search: :lua FzfLua.grep({ query = 'foo', search = '' }) As for live grep, you’re inputting a space into the regex so it searches for foo+space, that’s how regex works, you just need to use the right tool for what you’re trying to do. |
Beta Was this translation helpful? Give feedback.
-
doesn't looks like intuitive for me, the native fzf not use regex by default and the while i read the help of fzf-lua-search, it's not mentioned the regex, mybe is noted in some places in the help. i also have this problem in t thanks for the fast reply, i try to use it like you mentioned and i will try to use regex, because regex is cool and determinate, but for me, i hat TUI in neovim, i just use it with a specific usecase like a startup. vf() {nvim -c ":lua require('fzf-
lua').grep({ query = '$@ '})" ;}
vf foo !bar |
Beta Was this translation helpful? Give feedback.
-
we should be easy to search for many strings like
foo 'bar !baz
the grep and live_grep is unsable at all.
grep need more step because we should be use input() and live_grep is not showing anything when pass one arg, because the space makes everything crazy.
Test
Fix grep is to easy
Beta Was this translation helpful? Give feedback.
All reactions