mirror of https://github.com/sbt/sbt.git
**Problem** When `last` output includes ANSI escape sequences (e.g. colored `[error]` lines), `lastGrep <pattern>` was matching against the raw string. The pattern could fail to match because it was compared to text like `\u001B[31merror\u001B[0m` instead of `error`, or matching was inconsistent. **Solution** - Strip ANSI from each line before running the regex, using `EscHelpers.stripColorsAndMoves` from `sbt.internal.util`. - **`Output.lastGrep`** (keys and file overloads): lines from the last run are stripped, then the pattern is applied to the stripped text; matching and printed lines are based on visible text. - **`Output.grep`**: each line is stripped before `showMatches(pattern)` so the pattern is applied only to visible content. |
||
|---|---|---|
| .. | ||
| src | ||
| NOTICE | ||