Click to save the rule. Repeat this process for other common keywords like WARN (yellow) or SUCCESS (green). Step 4: Activate the Highlight Set Open an active terminal session.
Color rules apply to historical scrollback buffers and live, streaming data like tail -f . Step-by-Step: Creating Your First Highlight Set
Select your new Highlight Set from the list and click .
The flexibility of regex allows you to craft rules for any scenario you can describe. For instance, to highlight lines that contain either "successful", "allowed", or the Chinese equivalent "成功", you could use a rule like: [^A-Za-z_&-](accepted|allowed|enabled|connected|successfully|成功|正确)[^A-Za-z_-]
The scene opens in the hum of late-night ops: a dim screen, a dozen tabs, logs pouring like a waterfall. Errors blink red, warnings glow amber, and somewhere in the stream of syslog there are the fragile, repeating markers of a problem you’ve seen before and want to catch sooner next time. You’ve learned the hard way that human attention is limited; color becomes a prosthetic for memory, a way to make the ephemeral persistent. Xshell’s highlight sets are an answer to that need—a customizable set of rules that paint matching text so you notice it, no matter how fast the terminal scrolls.
Would you like a ready-to-import .ini snippet for any of these highlight sets?
Optionally add a background highlight for maximum visibility.
To save you time, here are three ready-to-import highlight set configurations.
Setting this up is straightforward:
Static keyword matching is useful for static words like FAIL or SUCCESS , but it fails when dealing with dynamic data like IP addresses, timestamps, or process IDs. To solve this, Xshell supports standard Regular Expressions.
Give your set a descriptive, identifiable name (e.g., Nginx Log Analyzer or Production Safety ). Step 3: Add Keywords and Define Styles Select your newly created set and click . Click Add to introduce a new text pattern.
Check this if you are using advanced search patterns (more on this below). 3. Customizing the Visual Style
Check this box if you only want to highlight specific cases (e.g., error vs ERROR ).
The real power of lies in Regular Expressions (RegEx). Xshell uses the Perl-compatible regular expressions (PCRE) engine. Here are some advanced patterns you can use.
Example rules (expressed conceptually)