diff --git a/.config/bash/module/ps1.sh b/.config/bash/module/ps1.sh index c177733..17f3cb2 100644 --- a/.config/bash/module/ps1.sh +++ b/.config/bash/module/ps1.sh @@ -45,7 +45,9 @@ __prompt_command() # Add git branch if available. local git_branch="$(_git_current_branch)" - [[ "${git_branch}" = "" ]] || PS1+=" ${color_blue}@${git_branch}" + if [[ "${git_branch}" != "" ]]; then + [[ "${git_branch}" =~ (master|main) ]] || PS1+=" ${color_bblue}@${git_branch}" + fi # set error red if $is_error; then