Skip to content

Instantly share code, notes, and snippets.

@benr77
Last active December 2, 2017 14:47
Show Gist options
  • Save benr77/e5cfc8da463a3aa9c39c47a155727696 to your computer and use it in GitHub Desktop.
Save benr77/e5cfc8da463a3aa9c39c47a155727696 to your computer and use it in GitHub Desktop.

Download the .git-prompt.sh file from Git's repo

curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh > ~/.git-prompt.sh

Add the following to .bashrc in your homedir, after the PATH= definition

source ~/.git-prompt.sh
PS1='\[\e]2;\u@\H\a\]\n\n\n\[\e[44m\]\[\e[34;1m\]`date +"%a %d %b   %H:%M:%S   "``cat /proc/loadavg | cut -c -14`   \[\e[37;1m\]\w \[\e[0m\]\n\[\e[44m\]\[\e[37m\][\u@\h$(__git_ps1 " (%s)")]\$\[\e[0m\] '

Save the file, and reload changes

source ~/.bashrc

Et voila!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment