Skip to content

Instantly share code, notes, and snippets.

@ivanvc
Created August 27, 2009 15:05
Show Gist options
  • Save ivanvc/176350 to your computer and use it in GitHub Desktop.
Save ivanvc/176350 to your computer and use it in GitHub Desktop.
reset_colour="$(echo -n '\e[0m')"
bold_colour="$(echo -n '\e[1m')"
# Foreground
grey="$(echo -n '\e[30m')"
red="$(echo -n '\e[31m')"
green="$(echo -n '\e[32m')"
yellow="$(echo -n '\e[33m')"
blue="$(echo -n '\e[34m')"
magenta="$(echo -n '\e[35m')"
cyan="$(echo -n '\e[36m')"
white="$(echo -n '\e[37m')"
# Background
bg_grey="$(echo -n '\e[40m')"
bg_red="$(echo -n '\e[41m')"
bg_green="$(echo -n '\e[42m')"
bg_yellow="$(echo -n '\e[43m')"
bg_blue="$(echo -n '\e[44m')"
bg_magenta="$(echo -n '\e[45m')"
bg_cyan="$(echo -n '\e[46m')"
bg_white="$(echo -n '\e[47m')"
PROMPT_NEWLINE=$(echo -ne "\n%{\r%}")
if [[ -n $SSH_CONNECTION ]]; then
export PS1='%m:%3~$(git_info_for_prompt)%# '
else
export PS1='$(git_info_for_prompt)%# '
export RPS1='[%2~]'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment