fix(shell)!: default ripgrep to --include-zero
Grep normally outputs zero if a count is empty, and when we are aliasing
ripgrep to grep it can sometimes end up in other aliases. It's critical,
therefore, for our grep/ripgrep compatibility to be as high as possible
--include-zero brings ripgrep's behavior closer to grep, although it may
break script compatibility if scripts are expecting the default ripgrep
behavior
BREAKING-CHANGE: This changes the behavior of ripgrep, potentially breaking compatibility with scripts or aliases
Change-Id: Id6493c459490696869bb86f77b713c4953192a2d
Reviewed-on: https://git.clicks.codes/c/Chimera/NixFiles/+/703
Tested-by: Skyler Grey <minion@clicks.codes>
Reviewed-by: Samuel Shuert <coded@clicks.codes>
diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix
index bdfa4c0..66bea83 100644
--- a/modules/home/shell/default.nix
+++ b/modules/home/shell/default.nix
@@ -85,7 +85,7 @@
clr = "clear";
edit = builtins.toString config.home.sessionVariables.EDITOR;
find = lib.mkIf config.chimera.shell.replacements.bfs.enable "${pkgs.bfs}/bin/bfs";
- grep = lib.mkIf config.chimera.shell.replacements.ripgrep.enable "${config.programs.ripgrep.package}/bin/rg";
+ grep = lib.mkIf config.chimera.shell.replacements.ripgrep.enable "${config.programs.ripgrep.package}/bin/rg --include-zero";
top = lib.mkIf config.chimera.shell.replacements.htop.enable "${config.programs.htop.package}/bin/htop";
tree = lib.mkIf config.chimera.shell.replacements.erdtree.enable "${pkgs.erdtree}/bin/erdtree";
du = lib.mkIf config.chimera.shell.replacements.dust.enable "${pkgs.dust}/bin/dust";