over 4 years ago

## Über prompt string for modern commandline

Okay. Today's XXI century already. You have colored commandlines everywhere
and you have basically single-user *nix OSes. Now it's time to shift from default
commandline prompt strings to something more useful (and fancy, of course).

This is how my prompt looks like now:

This is four-line prompt.

1. Empty line as a separator.
2. Clean cut with command history number and 72 dashes.
3. User and host names, current time, jobs count and current directory.
4. Emoticon showing the result of last command and the traditional  symbol (which bears no meaning here, really). If we currently are in the Git repo, then between this tokens the current branch name is being shown in square brackets.

Emoticon at the last line behaves like this:

Big thanks to Make Tech Easier for inspiration.

Here how it was done...

### The script

I put the code for constructing PS1 variable in the separate script.

To use this script, you should source the .bash_prompt from your .bashrc
file and of course the first line of .bash_prompt should correctly source
the .bash_colors, too.