Files
linux-workspace/rc/03-values.sh
lachtan e351f2e924 Extract shared prompt values and refactor bash/git prompts
Move color constants and PS1 escape sequences from bash-prompt.sh into
a new shared rc/03-values.sh, and extract the user@host:dir fragment as
LWS_PS1_USER_HOST to eliminate duplication between bash-prompt.sh and
git-prompt.sh. Wire up git-prompt to use bash-git-prompt with the shared
prompt variables.
2026-03-12 12:36:13 +01:00

13 lines
351 B
Bash

# Terminal colors
LWS_RED=$(tput setaf 1)
LWS_GREEN=$(tput setaf 2)
LWS_CYAN=$(tput setaf 6)
LWS_COLOR_RESET=$(tput sgr0)
# Bash prompt escape sequences
LWS_PS1_USER='\u'
LWS_PS1_HOST='\h'
LWS_PS1_DIR='\w'
LWS_PS1_TYPE='\$'
LWS_PS1_USER_HOST="${LWS_GREEN}${LWS_PS1_USER}@${LWS_PS1_HOST}${LWS_COLOR_RESET}:${LWS_CYAN}${LWS_PS1_DIR}${LWS_COLOR_RESET}"