My bash prompt is just me copying the prompt I have set on fish.
# Prompt
green=$'\e[38;5;2m'
bright_red=$'\e[38;5;9m'
bright_green=$'\e[38;5;10m'
reset=$'\e[0m'
prompt_command()
{
local exit_status=$?
if [[ $exit_status != 0 ]]; then
exit_color=$bright_red
exit_prompt=" [$exit_status]"
else
exit_color=$bright_green
exit_prompt=""
fi
}
PROMPT_COMMAND=prompt_command
PS1='\[$green\]\w\[$exit_color\]$exit_prompt\n❯ \[$reset\]'
I have a small issue with this prompt though. Sometimes the ❯ ends up turning white for some reason.
KDE