The pitch: you launch your gradle build. It fails. Good news, it’s because Room or Dagger has detected for you an error very early. Even better, the error is very explicit. Sadly, to find it you will have to scroll up four screens of pure stacktracy noise. Ah no, you went too far! Scroll forward. Strange, why is this suddenly a problem? Ah no, this line was just an unrelated warning.

Sounds familiar? Soon it won’t be

iTerm2 visually filtering out the noise

How?

iTerm2 supports user-defined triggers, which are actions that run when text matching a regular expression is received. You can use it to highlight words, automatically respond to prompts, notify you when something important happens, and more.

But how?

Profiles > Open Profiles > Edit Profiles

The trigger I added associates a red color on a white background to this regular expression

^e:.*$

Trigger for gradle errors

Using another terminal?

Please leave a comment if you know how to replicate this very simple and very useful tip!