diff --git a/tcshrc.prompt.colors b/tcshrc.prompt.colors index 634fde0..f0b2879 100644 --- a/tcshrc.prompt.colors +++ b/tcshrc.prompt.colors @@ -13,13 +13,12 @@ set at_color="${dim_cyan}" set path_color="ansi:10" set line_color="ansi:1" set prompt_color="reset" -set depth_color="${dim_yellow}" +set depth_color="ansi:3" set color_start="%{" set color_end="%}" set at_color_seq="${color_start}${at_color}${color_end}" -set depth_color_seq="${color_start}${depth_color}${color_end}" ########################### # vim:filetype=tcsh diff --git a/tcshrc.prompt.defs b/tcshrc.prompt.defs index 6394b8c..28b9905 100644 --- a/tcshrc.prompt.defs +++ b/tcshrc.prompt.defs @@ -122,7 +122,7 @@ if( $?CSHENV_DEBUG ) then endif -set depth_prompt="${depth_color_seq}(${shlvl})" +set depth_prompt="(${shlvl})" #we "convert" pts/$number entries to ttypK entries? set line_prompt="`tty | sed -e 's;/dev/tty;;' -e 's;/dev/pts/;p/;' -e 's;/dev/;;' -e 's/not a tty/${unknown_tty}/'`" diff --git a/tcshrc.prompt.final b/tcshrc.prompt.final index 7f21d96..5366ee2 100644 --- a/tcshrc.prompt.final +++ b/tcshrc.prompt.final @@ -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=""