Take the 2-minute tour ×



  1. Current directory/or pwd.
  2. Git status and branch.

The rest is just bling and is often irritating.



share|improve this question
Also asked on Unix&Linux: unix.stackexchange.com/q/34508/4667 –  glenn jackman Mar 19 '12 at 13:22
add comment

1 Answer

The man page of bash has a section PROMPTING (shouting in the original), from which I only cite the beginning:


          \w     the  current working directory, with $HOME
                 abbreviated with a tilde (uses the value of the
                 PROMPT_DIRTRIM variable)
          \W     the basename of the current working directory,
                 with $HOME abbreviated with a tilde

You can include the result for a command - since I don't know git well enough, I use $(date +%S) as example:

PS1='\w $(date +%S) > '

I don't understand requirement 3. Is this a request how to define colors for ls?

Ah - from the question on U&L, I think you're asking for such a thing:

In ~/.bashrc I have an entry:

# enable color support of ls and also add handy aliases
    eval "`dircolors -b`"
    alias ls='ls --color=auto'

to use ls per default with --color=auto.

share|improve this answer
add comment

Your Answer


