Skip to content

How to grep for a string only within a sub-folder? #1501

Answered by ibhagwan
benfrain asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, my [debug] seems to not have the --iglob bit... could I be missing something in my config?

You either have to use live_grep_glob or set grep = { rg_glob = true } in your setup call to enable globs for all grep/live_grep pickers.

And this is the format I would write on the CLI which is also not producing anything in FZF but I think I'm probably misunderstanding (sorry!)

As you can see from the generated command everything you type is searched for as a regex, this obviously leads to no results, what you’re writing in the shell is telling rg to search only the sub folder which is equivalent to:

:FzfLua grep search=leader cwd=setup
-- or live grep and input “leader”
:FzfLua live_grep c…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
11 replies
@ibhagwan
Comment options

@benfrain
Comment options

@benfrain
Comment options

@ibhagwan
Comment options

Answer selected by benfrain
@ibhagwan
Comment options

@benfrain
Comment options

@ibhagwan
Comment options

@benfrain
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants