From 1dd7e12d7904be44f86644387eaa97f7adafff68 Mon Sep 17 00:00:00 2001 From: Julio Biason Date: Fri, 11 May 2018 18:15:33 -0300 Subject: [PATCH] added my ps1 prompt --- bash/bash_ps1.bash | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 bash/bash_ps1.bash diff --git a/bash/bash_ps1.bash b/bash/bash_ps1.bash new file mode 100644 index 0000000..c5bca4f --- /dev/null +++ b/bash/bash_ps1.bash @@ -0,0 +1,9 @@ +FORE_ORANGE="\[$(tput setaf 208)\]" +FORE_PURPLE="\[$(tput setaf 103)\]" +FORE_GREEN="\[$(tput setaf 148)\]" +RESET="\[$(tput sgr0)\]" +git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \1/' +} +export PS1="${FORE_BOLD}${FORE_PURPLE}\u${FORE_GREEN}\$(git_branch) ${FORE_ORANGE}\w \$${RESET} " +