How can I style the command being entered in a bash prompt?

Posted by C4H5As on Super User See other posts from Super User or by C4H5As
Published on 2013-11-01T03:20:34Z Indexed on 2013/11/01 3:58 UTC
Read the original article Hit count: 530

Filed under:
|
|
|

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?

© Super User or respective owner

Related posts about command-line

Related posts about bash