Skip to content

Instantly share code, notes, and snippets.

@petyosi
Last active February 9, 2018 14:26
Show Gist options
  • Save petyosi/eb849b72d03478194b11f8c47c524cf6 to your computer and use it in GitHub Desktop.
Save petyosi/eb849b72d03478194b11f8c47c524cf6 to your computer and use it in GitHub Desktop.
# just the current directory name - not the full path
PathShort="\W";
# round brackets surround the Git output
# I prefer them to square brackets - I couldn't tell you why ;-)
GIT_PROMPT_PREFIX="(" # start of the git info string
GIT_PROMPT_SUFFIX=")" # the end of the git info string
# change a couple of the colours to be inline with what I've configured in Git
GIT_PROMPT_CHANGED="${Green}✚ " # the number of changed files
GIT_PROMPT_UNTRACKED="${Red}…" # the number of untracked files/dirs
# The pre-Git output - show username@host current-directory
# This information will be displayed all the time, even if not in a Git controlled directory
GIT_PROMPT_START_USER="${USER}@${HOSTNAME} ${Yellow}${PathShort}${ResetColor}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment