I'm wondering if it's possible to apply a customised highlighting scheme to linux terminal output, outside of the application that's generating the output. (Therefore, piping the output to some kind of colouriser would not do, because it wouldn't work for interactive output.) Ideally, you could apply some kind of regexp to each line, and a colour would be applied to each line that matches. (assuming the facility is switched on)

So, does anyone know of a terminal that offers this feature? The absolute best possibility would be something screen-like, that sits between the terminal and the shell, and processes the output without getting in anything's way.


You can use this feature in zsh using zsh-syntax-highlighting.

enter image description here

FISH also does this, but I have not tried it myself. (Site seems to be a little broken for now)

  • This seems interesting, but does this work for command line programs running within the terminal, or does it just work with the shell itself? – Fhnuzoag Oct 18 '12 at 17:31
  • zsh-syntax-highlighting works for anything that you type in, not the output of applications. Take a look at slhck's answer here: Where can I find bash_profile / bashrc themes? Edit: Don't forget that you can use aliases in your ~/.zshrc or ~/.bashrc such as alias ls='ls --color=auto. – dset0x Oct 18 '12 at 17:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.