Skip to content

Instantly share code, notes, and snippets.

@vaspoz
vaspoz / christmas-prompt.sh
Last active November 25, 2024 07:13
Christmas prompt
# print the git branch name if in a git project
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'
}
# set the input prompt symbol
ARROW="❯"
# define text formatting
PROMPT_BOLD="$(tput bold)"
PROMPT_UNDERLINE="$(tput smul)"
PROMPT_FG_GREEN="$(tput setaf 2)"