Skip to content

Instantly share code, notes, and snippets.

@Flushot
Last active September 21, 2018 02:41
Show Gist options
  • Select an option

  • Save Flushot/301f5201ebb65bc9db8e to your computer and use it in GitHub Desktop.

Select an option

Save Flushot/301f5201ebb65bc9db8e to your computer and use it in GitHub Desktop.
PS1
__git_ps1 ()
{
local b="$(git symbolic-ref HEAD 2>/dev/null)";
if [ -n "$b" ]; then
printf " (%s)" "${b##refs/heads/}";
fi
}
export PS1="\[\033[0;32m\][\D{%H:%M}] \[\033[0;32m\]\h:\[\033[0;33m\]\w\[\033[35m\]\$(__git_ps1) \[\033[0;36m\]\u\\$ \[\033[0m\]"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment