This commit is contained in:
fatalerrors
2026-04-15 16:03:10 +02:00
parent 91f033743d
commit 4e3cccff64

View File

@@ -273,15 +273,15 @@ set_prompt()
# Resolve theme/config colours with hardcoded fallbacks
local _time_fg="${PROMPT_COLOR_TIME_FG:-$Blue}"
local _time_bg="${PROMPT_COLOR_TIME_BG:-$On_IBlack}"
local _time_bg="${PROMPT_COLOR_TIME_BG:-$On_White}"
local _bar_bg="${PROMPT_COLOR_BAR_BG:-$On_Blue}"
local _ok_fg="${PROMPT_COLOR_OK_FG:-$White}"
local _ok_mark="${PROMPT_COLOR_OK_MARK:-$Green}"
local _ok_fg="${PROMPT_COLOR_OK_FG:-$BWhite}"
local _ok_mark="${PROMPT_COLOR_OK_MARK:-$BGreen}"
local _err_bg="${PROMPT_COLOR_ERR_BG:-$On_Red}"
local _err_fg="${PROMPT_COLOR_ERR_FG:-$White}"
local _err_mark="${PROMPT_COLOR_ERR_MARK:-$BYellow}"
local _root_fg="${PROMPT_COLOR_ROOT_FG:-$Red}"
local _user_fg="${PROMPT_COLOR_USER_FG:-$Green}"
local _user_fg="${PROMPT_COLOR_USER_FG:-$BGreen}"
local _dir_fg="${PROMPT_COLOR_DIR_FG:-$ICyan}"
# Begin with time (cursor-save is non-printing; all ANSI sequences wrapped
@@ -292,10 +292,10 @@ set_prompt()
# 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_mark}\]${Checkmark} "
else
PS1+="\[${_err_fg}\]\[${_err_bg}\] [ \$Last_Command "
PS1+="\[${_err_mark}\]${FancyX}\[${_err_bg}\] "
PS1+="\[${_err_mark}\]${FancyX} "
fi
# Add the elapsed time
@@ -308,9 +308,9 @@ set_prompt()
else
PS1+="\[${_user_fg}\]\\u@\\h"
fi
PS1+="\[\e[K\e[u\]\[$DEFAULTCOL\]\n"
PS1+="\[\e[K\e[u\]\[$RESETCOL\]\n"
# Print the working directory and prompt marker, then reset colour.
PS1+="\[${_dir_fg}\]\\w \\\$\[$DEFAULTCOL\] "
PS1+="\[${_dir_fg}\]\\w \\\$\[$RESETCOL\] "
}
# ------------------------------------------------------------------------------