Re: Fwd: playing with IFS
dana <[email protected]> Mon, 13 Apr 2026 13:30:27 -0500
| Newsgroups | gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
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