From a9485b4b3bca30418cbc2ed8cc7ab222983cc4a5 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Sun, 5 Jun 2022 12:35:21 -0400 Subject: [PATCH] Fixed up the prompt sigil itself. --- tcshrc.prompt.colors | 5 +---- tcshrc.prompt.defs | 2 +- tcshrc.prompt.final | 10 +++++++++- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/tcshrc.prompt.colors b/tcshrc.prompt.colors index 20ec515..f5d4f65 100644 --- a/tcshrc.prompt.colors +++ b/tcshrc.prompt.colors @@ -12,18 +12,15 @@ set user_color="ansi:14" set at_color="${dim_cyan}" set path_color="ansi:10" set line_color="${dim_red}" -set prompt_color="${dim}" +set prompt_color="reset" set depth_color="${dim_yellow}" -set command_color="${dim}" 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 prompt_color_seq="${color_start}${prompt_color}${color_end}" set depth_color_seq="${color_start}${depth_color}${color_end}" -set command_color_seq="${color_start}${command_color}${color_end}" ########################### # vim:filetype=tcsh diff --git a/tcshrc.prompt.defs b/tcshrc.prompt.defs index b3df509..e0085e0 100644 --- a/tcshrc.prompt.defs +++ b/tcshrc.prompt.defs @@ -129,7 +129,7 @@ set line_prompt="${line_color_seq}`tty | sed -e 's;/dev/tty;;' -e 's;/dev/pts/;p set user_prompt="%n" set host_prompt="${CSHENV_HOSTNAME}" set path_prompt="%c02" -set end_prompt="${prompt_color_seq}%#${command_color_seq} " +set end_prompt="%#" alias oldp 'set prompt="$prompt_simple"; set cshenv_user_prompt_override' alias newp 'set prompt="$prompt_cool"; set cshenv_user_prompt_override' diff --git a/tcshrc.prompt.final b/tcshrc.prompt.final index a5154a9..be4daca 100644 --- a/tcshrc.prompt.final +++ b/tcshrc.prompt.final @@ -61,6 +61,14 @@ if( "${curr_user_color}" != "${user_color}" ) then set user_color_seq="%{[`__build_sgr_code no-csi reset ${curr_user_color}`m%}" endif +if( ! $?curr_prompt_color ) then + set curr_prompt_color=impossible +endif +if( "${curr_prompt_color}" != "${prompt_color}" ) then + set curr_prompt_color="${prompt_color}" + set prompt_color_seq="%{[`__build_sgr_code no-csi reset ${curr_prompt_color}`m%}" +endif + if( ${prompt_hcolor} != 0 ) then set last_color = ${reference_colors[${prompt_hcolor}]} @@ -253,7 +261,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_PATH ) then set path_prompt_view="%{${path_color_seq}%}${path_prompt}%{${sgr_reset}%}" endif -set prompt_cool="%{\n%}${align_prefix}${battery_prefix}${battery_prompt}${date_prompt_view}%{ %}${time_prompt_view}${align_suffix}${brace_color_seq}\[%{${sgr_reset}%}${prompt_reference_view}${line_prompt_view}${depth_prompt_view}${line_spacer_view}${user_prompt_view}${at_view}${host_prompt_view}${git_prompt_view}${path_prompt_view}${brace_color_seq}\]%{${sgr_reset}%}${end_prompt}%{${text_color_seq}%}" +set prompt_cool="%{\n%}${align_prefix}${battery_prefix}${battery_prompt}${date_prompt_view}%{ %}${time_prompt_view}${align_suffix}${brace_color_seq}\[%{${sgr_reset}%}${prompt_reference_view}${line_prompt_view}${depth_prompt_view}${line_spacer_view}${user_prompt_view}${at_view}${host_prompt_view}${git_prompt_view}${path_prompt_view}${brace_color_seq}\]%{${sgr_reset}%}${prompt_color_seq}${end_prompt}%{${sgr_reset}${text_color_seq}%} "