Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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/ ).

share|improve this answer
    
Looks like fish does it all out of the box. Thanks! –  Mark McDonald Nov 2 '13 at 8:55
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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