Ps1 : Fix color braces.
This commit is contained in:
parent
7fe72384b5
commit
54d3c95eb0
|
@ -46,7 +46,7 @@ function __prompt_command() {
|
||||||
if ! _git_is_dotfiles; then
|
if ! _git_is_dotfiles; then
|
||||||
local git_branch="$(_git_current_branch)"
|
local git_branch="$(_git_current_branch)"
|
||||||
if [[ "${git_branch}" != "" ]]; then
|
if [[ "${git_branch}" != "" ]]; then
|
||||||
PS1+=" ${color_bblue}@${git_branch}"
|
PS1+=" \[${color_bblue}\]@${git_branch}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -61,11 +61,11 @@ function __prompt_command() {
|
||||||
|
|
||||||
# If error, show code.
|
# If error, show code.
|
||||||
if ${is_error}; then
|
if ${is_error}; then
|
||||||
PS1+="${color_red}("
|
PS1+="\[${color_red}\]("
|
||||||
PS1+="${last_status}"
|
PS1+="${last_status}"
|
||||||
local error_type="$(_ps1error ${last_status})"
|
local error_type="$(_ps1error ${last_status})"
|
||||||
[[ "${error_type}" != "" ]] && PS1+=" ${error_type}"
|
[[ "${error_type}" != "" ]] && PS1+=" ${error_type}"
|
||||||
PS1+=")${color_default} "
|
PS1+=")\[${color_default}\] "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# command on new line
|
# command on new line
|
||||||
|
@ -74,7 +74,7 @@ function __prompt_command() {
|
||||||
|
|
||||||
# Show nix shell name.
|
# Show nix shell name.
|
||||||
if [ -n "${NIX_SHELL}" ]; then
|
if [ -n "${NIX_SHELL}" ]; then
|
||||||
PS1+="${color_white}${NIX_SHELL}${color_default} "
|
PS1+="\[${color_white}\]${NIX_SHELL}\[${color_default}\] "
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Show remote connections.
|
# Show remote connections.
|
||||||
|
|
Reference in a new issue