Fine grained control over prompt elements.
Use `CSHENV_DISABLE_PROMPT_` env vars to control these.
This commit is contained in:
@ -142,7 +142,58 @@ else
|
||||
endif
|
||||
|
||||
#set prompt_cool="%{\n%}${align_prefix}${battery_prefix}${battery_prompt}${date_prompt}${align_suffix}${git_prompt}${brace_color_seq}\[${prompt_reference}${line_prompt}${depth_prompt}${user_prompt}${at_color_seq}@${host_prompt}${text_color_seq}\: ${path_prompt}${brace_color_seq}\]${end_prompt}"
|
||||
set prompt_cool="%{\n%}${align_prefix}${battery_prefix}${battery_prompt}${date_prompt}${align_suffix}${brace_color_seq}\[${prompt_reference}${line_prompt}${depth_prompt}${user_prompt}${at_color_seq}@${host_prompt}${text_color_seq}\: ${git_prompt}${path_prompt}${brace_color_seq}\]${end_prompt}"
|
||||
set prompt_reference_view=""
|
||||
set line_prompt_view=""
|
||||
set depth_prompt_view=""
|
||||
set user_prompt_view
|
||||
set at_view=""
|
||||
set host_prompt_view=""
|
||||
set git_prompt_view=""
|
||||
set path_prompt_view=""
|
||||
set line_spacer_view=""
|
||||
|
||||
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_spacer_view="${text_color_seq}\- "
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_NESTING ) then
|
||||
set depth_prompt_spacing=""
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_TTY ) then
|
||||
set depth_prompt_spacing=" "
|
||||
endif
|
||||
set depth_prompt_view="${depth_prompt_spacing}${depth_prompt}"
|
||||
if( $?CSHENV_HIDE_SHELL_LEVEL_AT_ONE ) then
|
||||
if( ${shlvl} == 1 ) then
|
||||
set depth_prompt_view=""
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_USER ) then
|
||||
set user_prompt_view="${user_prompt}"
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_HOST ) then
|
||||
set at_view="${at_color_seq}@"
|
||||
endif
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_HOST ) then
|
||||
set host_prompt_tail=": "
|
||||
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}"
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_GIT ) then
|
||||
set git_prompt_view="${git_prompt}"
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_PATH ) then
|
||||
set path_prompt_view="${path_prompt}"
|
||||
endif
|
||||
|
||||
set prompt_cool="%{\n%}${align_prefix}${battery_prefix}${battery_prompt}${date_prompt}${align_suffix}${brace_color_seq}\[${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}\]${end_prompt}"
|
||||
|
||||
|
||||
|
||||
if( ! ${?cshenv_user_prompt_override} ) then
|
||||
set prompt="$prompt_cool"
|
||||
|
Reference in New Issue
Block a user