Last active
March 9, 2024 19:14
-
-
Save cartercanedy/1d60cce3584a3c7b6d570edbca3ec864 to your computer and use it in GitHub Desktop.
bash prompt
This file contains hidden or 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
GREEN="" | |
RED="" | |
NO_COLOR="" | |
BLUE="" | |
if [ "$color_prompt" = yes ]; then | |
GREEN='\033[01;32m' | |
RED='\033[01;31m' | |
NO_COLOR='\033[00m' | |
BLUE='\033[34m' | |
fi | |
PS1=$'\u2554'"[${debian_chroot:+($debian_chroot)}$GREEN\u$NO_COLOR@$RED\h$NO_COLOR] "$'\u276f'" $BLUE\w$NO_COLOR\n"$'\u255a'" \$ " | |
NOCONDA_PS1="$PS1" | |
__fmt_conda_prompt() { | |
if [ $CONDA_SHLVL ] && [ "$CONDA_SHLVL" != "0" ]; then | |
PS1="(${CONDA_DEFAULT_ENV})\n${NOCONDA_PS1}" | |
else | |
PS1="$NOCONDA_PS1" | |
fi | |
} | |
PROMPT_COMMAND=__fmt_conda_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment