diff --git a/.config/bash/module/Ps1.sh b/.config/bash/module/Ps1.sh index e9ce6cb..d8c26da 100644 --- a/.config/bash/module/Ps1.sh +++ b/.config/bash/module/Ps1.sh @@ -46,7 +46,7 @@ function __prompt_command() { if ! _git_is_dotfiles; then local git_branch="$(_git_current_branch)" if [[ "${git_branch}" != "" ]]; then - PS1+=" ${color_bblue}@${git_branch}" + PS1+=" \[${color_bblue}\]@${git_branch}" fi fi @@ -61,11 +61,11 @@ function __prompt_command() { # If error, show code. if ${is_error}; then - PS1+="${color_red}(" + PS1+="\[${color_red}\](" PS1+="${last_status}" local error_type="$(_ps1error ${last_status})" [[ "${error_type}" != "" ]] && PS1+=" ${error_type}" - PS1+=")${color_default} " + PS1+=")\[${color_default}\] " fi # command on new line @@ -74,7 +74,7 @@ function __prompt_command() { # Show nix shell name. if [ -n "${NIX_SHELL}" ]; then - PS1+="${color_white}${NIX_SHELL}${color_default} " + PS1+="\[${color_white}\]${NIX_SHELL}\[${color_default}\] " fi # Show remote connections.