From f0343bf2c96bc521b60eef9f472787e24117befd Mon Sep 17 00:00:00 2001 From: xdBronch <51252236+xdBronch@users.noreply.github.com> Date: Sat, 12 Oct 2024 01:06:20 -0400 Subject: [PATCH] make rg use smart case this makes the search case insensitive by default but case sensitive when uppercase letters are used. I'd like something similar to vim where you can preface the query with `\C` to force case sensitivity but afaict rg doesnt have this, maybe we just do it ourselves? --- src/ripgrep.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ripgrep.zig b/src/ripgrep.zig index ede7879..6109a92 100644 --- a/src/ripgrep.zig +++ b/src/ripgrep.zig @@ -120,6 +120,7 @@ const Process = struct { // "--line-buffered", "--fixed-strings", "--json", + "--smart-case", self.query, }); self.sp = tp.subprocess.init(self.allocator, args, module_name, self.stdin_behavior) catch |e| return tp.exit_error(e, @errorReturnTrace());