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:
Iordanis Petkakis 2025-10-21 09:38:26 +03:00 committed by GitHub
parent 9df47bce6a
commit 7502e77803
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View file

@ -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",

View 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 "."