diff --git a/tcshrc.prompt.colors b/tcshrc.prompt.colors index f5d4f65..634fde0 100644 --- a/tcshrc.prompt.colors +++ b/tcshrc.prompt.colors @@ -11,7 +11,7 @@ set host_color="ansi:12" set user_color="ansi:14" set at_color="${dim_cyan}" set path_color="ansi:10" -set line_color="${dim_red}" +set line_color="ansi:1" set prompt_color="reset" set depth_color="${dim_yellow}" @@ -19,7 +19,6 @@ set color_start="%{" set color_end="%}" set at_color_seq="${color_start}${at_color}${color_end}" -set line_color_seq="${color_start}${line_color}${color_end}" set depth_color_seq="${color_start}${depth_color}${color_end}" ########################### diff --git a/tcshrc.prompt.defs b/tcshrc.prompt.defs index e0085e0..6394b8c 100644 --- a/tcshrc.prompt.defs +++ b/tcshrc.prompt.defs @@ -125,7 +125,8 @@ endif set depth_prompt="${depth_color_seq}(${shlvl})" #we "convert" pts/$number entries to ttypK entries? -set line_prompt="${line_color_seq}`tty | sed -e 's;/dev/tty;;' -e 's;/dev/pts/;p/;' -e 's;/dev/;;' -e 's/not a tty/${unknown_tty}/'`" +set line_prompt="`tty | sed -e 's;/dev/tty;;' -e 's;/dev/pts/;p/;' -e 's;/dev/;;' -e 's/not a tty/${unknown_tty}/'`" +#set line_prompt="line" set user_prompt="%n" set host_prompt="${CSHENV_HOSTNAME}" set path_prompt="%c02" diff --git a/tcshrc.prompt.final b/tcshrc.prompt.final index 67014cd..7f21d96 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_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