Created
September 6, 2024 23:58
-
-
Save charlesfranciscodev/573e54fcad141ec948a1f017e47a6de4 to your computer and use it in GitHub Desktop.
.bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# default editor | |
export EDITOR=nano | |
export VISUAL="$EDITOR" | |
# CDPATH | |
export CDPATH=.\ | |
:${HOME}\ | |
:${HOME}/code\ | |
function parse_git_branch() { | |
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p' | |
} | |
# current directory | |
DIR="\[\e[38;5;197m\]\W" | |
# current git branch | |
BRANCH="\[\e[38;5;39m\]\$(parse_git_branch)" | |
# default color | |
DEFAULT_COLOR="\[\e[00m\]" | |
# custom prompt | |
export PS1="${DIR} ${BRANCH} ${DEFAULT_COLOR}$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://technotes.adelerhof.eu/git/git_bash_prompt/