mirror of
https://github.com/folke/snacks.nvim
synced 2025-12-23 08:47:57 +00:00
fix(picker.git): add ignorecase for git_grep (#1629)
## Description Add option for `ignorecase` for `git_grep` <!-- Describe the big picture of your changes to communicate to the maintainers why we should accept this pull request. --> ## Related Issue(s) Fixes #1627 <!-- If this PR fixes any issues, please link to the issue here. - Fixes #<issue_number> --> ## Screenshots <!-- Add screenshots of the changes if applicable. -->
This commit is contained in:
parent
9df47bce6a
commit
7502e77803
2 changed files with 4 additions and 0 deletions
|
|
@ -256,6 +256,7 @@ M.git_files = {
|
|||
---@field untracked? boolean search in untracked files
|
||||
---@field submodules? boolean search in submodule files
|
||||
---@field need_search? boolean require a search pattern
|
||||
---@field ignorecase? boolean ignore case
|
||||
M.git_grep = {
|
||||
finder = "git_grep",
|
||||
format = "file",
|
||||
|
|
|
|||
|
|
@ -54,6 +54,9 @@ function M.grep(opts, ctx)
|
|||
elseif opts.submodules then
|
||||
table.insert(args, "--recurse-submodules")
|
||||
end
|
||||
if opts.ignorecase then
|
||||
table.insert(args, "-i")
|
||||
end
|
||||
table.insert(args, ctx.filter.search)
|
||||
if not opts.cwd then
|
||||
opts.cwd = Snacks.git.get_root() or uv.cwd() or "."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue