Added a whole dynamic prompt tuning command
This commit is contained in:
+34
-3
@@ -103,7 +103,6 @@ endif
|
||||
if( "${curr_date_color}" != "${date_color}" ) then
|
||||
set curr_date_color="${date_color}"
|
||||
set date_color_seq="[`__build_sgr_code no-csi reset ${curr_date_color}`m"
|
||||
set date_prompt_view="%{${date_color_seq}%}${date_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
|
||||
if( ! $?curr_time_color ) then
|
||||
@@ -112,7 +111,6 @@ endif
|
||||
if( "${curr_time_color}" != "${time_color}" ) then
|
||||
set curr_time_color="${time_color}"
|
||||
set time_color_seq="[`__build_sgr_code no-csi reset ${curr_time_color}`m"
|
||||
set time_prompt_view="%{${time_color_seq}%}${time_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
|
||||
if( ! $?curr_text_color ) then
|
||||
@@ -322,6 +320,14 @@ set git_prompt_view=""
|
||||
set path_prompt_view=""
|
||||
set line_spacer_view=""
|
||||
set dirs_prompt_view=""
|
||||
set time_prompt_view=""
|
||||
set date_prompt_view=""
|
||||
set battery_prompt_view=""
|
||||
set internal_bracket_view=""
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "About to setup prompt members, with disable checks"
|
||||
endif
|
||||
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_SIGIL ) then
|
||||
set prompt_reference_view="${prompt_reference}"
|
||||
@@ -343,6 +349,9 @@ if( ! $?CSHENV_DISABLE_PROMPT_NESTING ) then
|
||||
endif
|
||||
endif
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Up to the user and host checks..."
|
||||
endif
|
||||
set host_prompt_tail=": "
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_USER ) then
|
||||
set user_prompt_view="${user_color_seq}${user_prompt}%{${sgr_reset}%}"
|
||||
@@ -372,8 +381,30 @@ if( ! $?CSHENV_DISABLE_PROMPT_DIRS ) then
|
||||
endif
|
||||
endif
|
||||
|
||||
set prompt_cool="%{\n%}${align_prefix}${battery_prefix}${battery_prompt}${date_prompt_view}%{ %}${time_prompt_view}${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}${dirs_prompt_view}${brace_color_seq}\]${prompt_color_seq}${end_prompt}%{${text_color_seq}%} "
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Up to the time, date, and battery checks..."
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_TIME ) then
|
||||
set time_prompt_view="%{${time_color_seq}%}${time_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_DATE ) then
|
||||
set date_prompt_view="%{${date_color_seq}%}${date_prompt}%{${sgr_reset}%}"
|
||||
endif
|
||||
if( ! $?CSHENV_DISABLE_PROMPT_BATTERY ) then
|
||||
set battery_prompt_view="${battery_prefix}${battery_prompt}"
|
||||
endif
|
||||
|
||||
if( $?CSHENV_DEBUG ) then
|
||||
echo "Doing the internal bracket setup..."
|
||||
endif
|
||||
set internal_bracket_prompt="${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}${dirs_prompt_view}"
|
||||
if( "" != "${internal_bracket_prompt}" ) then
|
||||
#echo "I see scratch -${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}${dirs_prompt_view}-"
|
||||
#echo -n "${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}${dirs_prompt_view}" | dd of=/home/adam/scratch
|
||||
set internal_bracket_view="${brace_color_seq}\[${internal_bracket_prompt}${brace_color_seq}\]"
|
||||
endif
|
||||
|
||||
set prompt_cool="%{\n%}${align_prefix}${battery_prompt_view}${date_prompt_view}%{ %}${time_prompt_view}${align_suffix}${internal_bracket_view}${prompt_color_seq}${end_prompt}%{${text_color_seq}%} "
|
||||
|
||||
|
||||
if( ! ${?cshenv_user_prompt_override} ) then
|
||||
|
||||
Reference in New Issue
Block a user