While watching this intro video to Brunch, at about t=1:30 the command prompt being used has some very cool styles.

The part I'm interested in is how the presenter managed to colour the text being entered on the prompt, while it's being entered. It looks like the first argument is coloured green when it becomes a valid executable command & purple when it's invalid. Successive arguments appear white, though it looks like a valid file path gets an underline (see ~ t=2:01).

What's the trick here? Is this a custom terminal emulator? Is it some kind of magic $PS1?


I'm not sure that you can do this in bash. But it is possible in other shells, e.g. in zsh

https://github.com/zsh-users/zsh-syntax-highlighting ) or in fish http://fishshell.com/ ).

  • Looks like fish does it all out of the box. Thanks! – Mark McDonald Nov 2 '13 at 8:55

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.