Tighten PS1 caps and emphasize prompt arrow
- Bold the prompt arrow for stronger line-break emphasis - Tighten spacing at the right end cap - Document PS1 design rationale and palette
This commit is contained in:
@@ -123,18 +123,20 @@ ps1_on() {
|
||||
# Status colors
|
||||
local OK="\[\e[38;5;76m\]"
|
||||
local BAD="\[\e[38;5;203m\]"
|
||||
local BOLD="\[\e[1m\]"
|
||||
local NOBOLD="\[\e[22m\]"
|
||||
|
||||
# Separators w/ fallback (NF vs non-NF)
|
||||
local SEP_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "▶" )'
|
||||
local LEFT_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "[" )'
|
||||
local RIGHT_EXPR='\$( [ "$__PS1_USE_NF" -eq 1 ] && printf "" || printf "]" )'
|
||||
|
||||
local PROMPT_SYM="\$( [ \$__PS1_STATUS -eq 0 ] && printf '${OK}' || printf '${BAD}' )➜${RST}"
|
||||
local PROMPT_SYM="\$( [ \$__PS1_STATUS -eq 0 ] && printf '${OK}' || printf '${BAD}' )${BOLD}➜${NOBOLD}${RST}"
|
||||
|
||||
PS1="\
|
||||
${FRAME}╭─${RST}\
|
||||
${Z1_BG}${Z1_FG}${LEFT_EXPR} \d \A \u ${RST}${Z1_BG}${Z2_BG}${Z2_FG}${SEP_EXPR}${RST}\
|
||||
${Z2_BG}${Z2_FG} @\h ${PATH_FG}\${__PS1_PATH} ${RST}${Z2_BG}${Z2_FG}${RIGHT_EXPR}${RST}\
|
||||
${Z2_BG}${Z2_FG} @\h ${PATH_FG}\${__PS1_PATH}${RST}${Z2_BG}${Z2_FG}${RIGHT_EXPR}${RST}\
|
||||
\n${FRAME}╰── ${RST}${PROMPT_SYM} \${__PS1_SYM} "
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user