From 91f033743d77b6ac8f3c8ed43367955dc852d013 Mon Sep 17 00:00:00 2001 From: fatalerrors Date: Wed, 15 Apr 2026 15:54:58 +0200 Subject: [PATCH] bugfix --- profile.d/prompt.sh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/profile.d/prompt.sh b/profile.d/prompt.sh index 4721dc4..fd5d064 100644 --- a/profile.d/prompt.sh +++ b/profile.d/prompt.sh @@ -286,31 +286,31 @@ set_prompt() # Begin with time (cursor-save is non-printing; all ANSI sequences wrapped # in \[...\] so bash does not count them toward the visible line width) - PS1="\[\e[s\]${_time_fg}\]${_time_bg}\] [ \t ] ${_bar_bg}\]" + PS1="\[\e[s\]\[${_time_fg}\]\[${_time_bg}\] [ \t ] \[${_bar_bg}\]" # Add exit status of the last command. # If it was successful, print a green check mark. Otherwise, print a red X. if [[ $Last_Command == 0 ]]; then - PS1+="${_ok_fg}\]${_bar_bg}\] [ \$Last_Command " - PS1+="${_ok_mark}\]${Checkmark}${_bar_bg}\] " + PS1+="\[${_ok_fg}\]\[${_bar_bg}\] [ \$Last_Command " + PS1+="\[${_ok_mark}\]${Checkmark}\[${_bar_bg}\] " else - PS1+="${_err_fg}\]${_err_bg}\] [ \$Last_Command " - PS1+="${_err_mark}\]${FancyX}${_err_bg}\] " + PS1+="\[${_err_fg}\]\[${_err_bg}\] [ \$Last_Command " + PS1+="\[${_err_mark}\]${FancyX}\[${_err_bg}\] " fi # Add the elapsed time timer_stop - PS1+="($timer_show)${_ok_fg}\] ] ${_bar_bg}\] " + PS1+="($timer_show)\[${_ok_fg}\] ] \[${_bar_bg}\] " # If root, print the host in root colour. Otherwise use user colour. if [[ $EUID -eq 0 ]]; then - PS1+="${_root_fg}\]\\u${_user_fg}\]@\\h" + PS1+="\[${_root_fg}\]\\u\[${_user_fg}\]@\\h" else - PS1+="${_user_fg}\]\\u@\\h" + PS1+="\[${_user_fg}\]\\u@\\h" fi - PS1+="\[\e[K\e[u\]$DEFAULTCOL\]\n" + PS1+="\[\e[K\e[u\]\[$DEFAULTCOL\]\n" # Print the working directory and prompt marker, then reset colour. - PS1+="${_dir_fg}\]\\w \\\$$DEFAULTCOL\] " + PS1+="\[${_dir_fg}\]\\w \\\$\[$DEFAULTCOL\] " } # ------------------------------------------------------------------------------