Host colour rewritten.

This commit is contained in:
2022-06-04 19:30:34 -04:00
parent 8b398af672
commit 286e9117f1
3 changed files with 11 additions and 4 deletions

View File

@ -8,7 +8,7 @@ set time_color="ansi:13"
set text_color="reset"
set oldp_color="${dim}"
set brace_color="${bright_yellow}"
set host_color="${bright_blue}"
set host_color="ansi:12"
set name_color="${bright_cyan}"
set at_color="${dim_cyan}"
set path_color="ansi:10"
@ -22,7 +22,6 @@ set color_end="%}"
set oldp_color_seq="${color_start}${oldp_color}${color_end}"
set brace_color_seq="${color_start}${brace_color}${color_end}"
set host_color_seq="${color_start}${host_color}${color_end}"
set name_color_seq="${color_start}${name_color}${color_end}"
set at_color_seq="${color_start}${at_color}${color_end}"
set line_color_seq="${color_start}${line_color}${color_end}"

View File

@ -127,7 +127,7 @@ 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 user_prompt="${name_color_seq}%n"
set host_prompt="${host_color_seq}${CSHENV_HOSTNAME}"
set host_prompt="${CSHENV_HOSTNAME}"
set path_prompt="%c02"
set end_prompt="${prompt_color_seq}%#${command_color_seq} "

View File

@ -11,6 +11,14 @@ if( "${curr_path_color}" != "${path_color}" ) then
set path_color_seq="%{[`__build_sgr_code no-csi reset ${curr_path_color}`m%}"
endif
if( ! $?curr_host_color ) then
set curr_host_color=impossible
endif
if( "${curr_host_color}" != "${host_color}" ) then
set curr_host_color="${host_color}"
set host_color_seq="%{[`__build_sgr_code no-csi reset ${curr_host_color}`m%}"
endif
if( ! $?curr_date_color ) then
set curr_date_color=impossible
endif
@ -219,7 +227,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_HOST ) then
if( $?CSHENV_DISABLE_PROMPT_GIT && $?CSHENV_DISABLE_PROMPT_PATH ) then
set host_prompt_tail=""
endif
set host_prompt_view="${host_prompt}%{${text_color_seq}%}${host_prompt_tail}"
set host_prompt_view="${host_color_seq}${host_prompt}%{${text_color_seq}%}${host_prompt_tail}"
endif
if( ! $?CSHENV_DISABLE_PROMPT_GIT ) then
set git_prompt_view="${git_prompt}"