Colour for nesting depth prompt is now modernized

This commit is contained in:
2022-06-05 15:37:08 -04:00
parent e9fe40ca91
commit 00338131e5
3 changed files with 11 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_depth_color ) then
set curr_depth_color=impossible
endif
if( "${curr_depth_color}" != "${depth_color}" ) then
set curr_depth_color="${depth_color}"
set depth_color_seq="%{[`__build_sgr_code no-csi reset ${curr_depth_color}`m%}"
endif
if( ! $?curr_line_color ) then
set curr_line_color=impossible
endif
@ -248,7 +256,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_NESTING ) then
if( ! $?CSHENV_DISABLE_PROMPT_TTY ) then
set depth_prompt_spacing=" "
endif
set depth_prompt_view="${depth_prompt_spacing}${depth_prompt}"
set depth_prompt_view="${depth_color_seq}${depth_prompt_spacing}${depth_prompt}"
if( $?CSHENV_HIDE_SHELL_LEVEL_AT_ONE ) then
if( ${shlvl} == 1 ) then
set depth_prompt_view=""