Add layout order selection for seasonal prompts

This commit is contained in:
2026-01-24 16:15:28 +00:00
parent 9774c15d34
commit 98ae44cc3b
5 changed files with 68 additions and 8 deletions

View File

@@ -622,14 +622,16 @@ _ps1_set_prompt() {
local PATH_PART="${__PS1_PATH}"
local PATH_SEP=" "
local END_PAD=" "
if [[ "$__PS1_STYLE_PACK" == "contest" || "$__PS1_STYLE_PACK" == "holiday" ]]; then
local layout="${__PS1_CONTEST_LAYOUT:-day-time-user}"
local layout="${__PS1_CONTEST_LAYOUT:-day-time-user}"
if [[ "$__PS1_STYLE_PACK" == "contest" || "$__PS1_STYLE_PACK" == "holiday" || "$__PS1_STYLE_PACK" == "standard" ]]; then
case "$layout" in
user-time) L1="\\u \\A" ;;
time-user) L1="\\A \\u" ;;
day-time) L1="\\d \\A" ;;
*) L1="\\d \\A \\u" ;;
esac
fi
if [[ "$__PS1_STYLE_PACK" == "contest" || "$__PS1_STYLE_PACK" == "holiday" ]]; then
HOST_PART="@\\h - ${__PS1_PATH}"
PATH_PART=""
PATH_SEP=""