Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Fwd: playing with IFS
On Mon 13 Apr 2026, at 11:56, Mark J. Reed wrote:
> If you are capturing the output of grep in a variable it won't do any
> coloring at all unless you force it with --color=always. I would
> normally leave it off when operating grep programmatically... not sure
> why you'd want to capture it.
i assume it's an interactive wrapper for gnu grep that trims leading
white space from the matched lines
ripgrep has a --trim flag for this btw:
% rg -w Inf Src/params.c
5756: fprintf(fout, (dval < 0.0) ? "-Inf" : "Inf");
5765: ret = dupstring((dval < 0.0) ? "-Inf" : "Inf");
% rg --trim -w Inf Src/params.c
5756:fprintf(fout, (dval < 0.0) ? "-Inf" : "Inf");
5765:ret = dupstring((dval < 0.0) ? "-Inf" : "Inf");
dana
Messages sorted by:
Reverse Date,
Date,
Thread,
Author