Fix prompt delimiters when some tokens are disabled.

This commit is contained in:
2025-07-14 12:31:38 -04:00
parent 50d2b94ad0
commit 50e8a1dfd7

View File

@ -343,14 +343,16 @@ if( ! $?CSHENV_DISABLE_PROMPT_NESTING ) then
endif endif
endif endif
set host_prompt_tail=": "
if( ! $?CSHENV_DISABLE_PROMPT_USER ) then if( ! $?CSHENV_DISABLE_PROMPT_USER ) then
set user_prompt_view="${user_color_seq}${user_prompt}%{${sgr_reset}%}" set user_prompt_view="${user_color_seq}${user_prompt}%{${sgr_reset}%}"
if( ! $?CSHENV_DISABLE_PROMPT_HOST ) then if( ! $?CSHENV_DISABLE_PROMPT_HOST ) then
set at_view="${at_color_seq}@" set at_view="${at_color_seq}@"
else
set at_view="${host_prompt_tail}" # Hack
endif endif
endif endif
if( ! $?CSHENV_DISABLE_PROMPT_HOST ) then if( ! $?CSHENV_DISABLE_PROMPT_HOST ) then
set host_prompt_tail=": "
if( $?CSHENV_DISABLE_PROMPT_GIT && $?CSHENV_DISABLE_PROMPT_PATH ) then if( $?CSHENV_DISABLE_PROMPT_GIT && $?CSHENV_DISABLE_PROMPT_PATH ) then
set host_prompt_tail="" set host_prompt_tail=""
endif endif