Modernize the tty/line prompt.

This commit is contained in:
2022-06-05 15:03:03 -04:00
parent 78a3b59499
commit 2a3af31e7a
3 changed files with 12 additions and 4 deletions

View File

@ -7,6 +7,14 @@ if( $?CSHENV_DEBUG ) then
endif
# Recompute cached sgr codes from any configuration updates
if( ! $?curr_line_color ) then
set curr_line_color=impossible
endif
if( "${curr_line_color}" != "${line_color}" ) then
set curr_line_color="${line_color}"
set line_color_seq="%{[`__build_sgr_code no-csi reset ${curr_line_color}`m%}"
endif
if( ! $?curr_path_color ) then
set curr_path_color=impossible
endif
@ -232,7 +240,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_SIGIL ) then
set prompt_reference_view="${prompt_reference}"
endif
if( ! $?CSHENV_DISABLE_PROMPT_TTY ) then
set line_prompt_view="${line_prompt}"
set line_prompt_view="${line_color_seq}${line_prompt}"
set line_spacer_view="%{${text_color_seq}%}\- "
endif
if( ! $?CSHENV_DISABLE_PROMPT_NESTING ) then