Skip to content

Uses 'SearchText' on all files even with respectGitIgnore=true #6322

@njam

Description

@njam

What happened?

I was asking gemini-cli to replace usages of Regex::new() with a macro.
It would use the SearchText tool, but instead of only searching through the project files, it also searched through artifacts which are gitignored.

Is it expected that SearchText is searching also in gitignored files?

What did you expect to happen?

The SearchText should only search in non-ignored files, or gemini should use it more cleverly, e.g. only search in .rs files.

Client information

$ gemini /about
╭───────────────────────────────────────────────────────╮
│                                                       │
│ About Gemini CLI                                      │
│                                                       │
│ CLI Version       0.1.21                              │
│ Git Commit        055fe46d                            │
│ Model             gemini-2.5-pro                      │
│ Sandbox           no sandbox                          │
│ OS                linux                               │
│ Auth Method       gemini-api-key                      │
│                                                       │
╰───────────────────────────────────────────────────────╯

Login information

│ Auth Method gemini-api-key

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions