Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # From https://stackoverflow.com/a/58375763/9897863
- parse_git_branch() {
- git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
- }
- COLOR_DEF=$'\e[0m'
- COLOR_USR=$'\e[38;5;243m'
- COLOR_DIR=$'\e[38;5;197m'
- COLOR_GIT=$'\e[38;5;39m'
- NEWLINE=$'\n'
- setopt PROMPT_SUBST
- export PROMPT='${COLOR_USR}%n@%M ${COLOR_DIR}%d ${COLOR_GIT}$(parse_git_branch)${COLOR_DEF}${NEWLINE}%% '
Add Comment
Please, Sign In to add comment