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?
This commit is contained in:
xdBronch 2024-10-12 01:06:20 -04:00 committed by CJ van den Berg
parent e9a2ae79c4
commit f0343bf2c9
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -120,6 +120,7 @@ const Process = struct {
// "--line-buffered", // "--line-buffered",
"--fixed-strings", "--fixed-strings",
"--json", "--json",
"--smart-case",
self.query, self.query,
}); });
self.sp = tp.subprocess.init(self.allocator, args, module_name, self.stdin_behavior) catch |e| return tp.exit_error(e, @errorReturnTrace()); self.sp = tp.subprocess.init(self.allocator, args, module_name, self.stdin_behavior) catch |e| return tp.exit_error(e, @errorReturnTrace());