All the debugging I could find.
This commit is contained in:
@@ -30,7 +30,9 @@ if( $?CSHENV_DEBUG ) then
|
|||||||
echo "Set (in tcshrc hook) CSHENV_DIR to: " ${CSHENV_DIR}
|
echo "Set (in tcshrc hook) CSHENV_DIR to: " ${CSHENV_DIR}
|
||||||
endif
|
endif
|
||||||
|
|
||||||
alias _debug 'eval "if ( $?CSHENV_DEBUG ) echo \!*"'
|
alias _debug "eval 'if ( $?CSHENV_DEBUG ) echo \!*'"
|
||||||
|
_debug "Debug setup..."
|
||||||
|
_debug "Debug setup... (Paren test)"
|
||||||
|
|
||||||
setenv LC_NUMERIC en_US.UTF-8
|
setenv LC_NUMERIC en_US.UTF-8
|
||||||
setenv LC_MEASUREMENT en_US.UTF-8
|
setenv LC_MEASUREMENT en_US.UTF-8
|
||||||
|
|||||||
+1
-3
@@ -132,9 +132,7 @@ set date_prompt="%{%Y-%W-%D%}"
|
|||||||
set time_prompt="%{%P%}"
|
set time_prompt="%{%P%}"
|
||||||
#unset edit
|
#unset edit
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Building Cool prompt"
|
||||||
echo "Building Cool prompt"
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
set depth_prompt="(${shlvl})"
|
set depth_prompt="(${shlvl})"
|
||||||
|
|||||||
+11
-24
@@ -12,9 +12,7 @@
|
|||||||
# echo "Loaded prompt session information."
|
# echo "Loaded prompt session information."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Setting up dynamic colour loading..."
|
||||||
echo "Setting up dynamic colour loading..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Recompute cached sgr codes from any configuration updates
|
# Recompute cached sgr codes from any configuration updates
|
||||||
if( ! $?curr_branch_color ) then
|
if( ! $?curr_branch_color ) then
|
||||||
@@ -145,7 +143,7 @@ if( "${curr_prompt_color}" != "${prompt_color}" ) then
|
|||||||
set prompt_color_seq="%{[`__build_sgr_code no-csi reset ${curr_prompt_color}`m%}"
|
set prompt_color_seq="%{[`__build_sgr_code no-csi reset ${curr_prompt_color}`m%}"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) echo "Dynamic color loading processed..."
|
_debug "Dynamic color loading processed..."
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -167,9 +165,7 @@ set strong_battery_level = 75
|
|||||||
|
|
||||||
|
|
||||||
while( ${prompt_hcolor} == 0 )
|
while( ${prompt_hcolor} == 0 )
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug colorshuffle
|
||||||
echo colorshuffle
|
|
||||||
endif
|
|
||||||
#echo
|
#echo
|
||||||
# Shuffle, if supported
|
# Shuffle, if supported
|
||||||
if( $?CSHENV_DETECTED_SHUF ) then
|
if( $?CSHENV_DETECTED_SHUF ) then
|
||||||
@@ -189,9 +185,7 @@ end
|
|||||||
|
|
||||||
|
|
||||||
while( ${prompt_hsym} == 0 )
|
while( ${prompt_hsym} == 0 )
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug symbolshuffle
|
||||||
echo symbolshuffle
|
|
||||||
endif
|
|
||||||
#echo
|
#echo
|
||||||
if( $?CSHENV_DETECTED_SHUF ) then
|
if( $?CSHENV_DETECTED_SHUF ) then
|
||||||
set referencechars=`shuf -e $referencechars`
|
set referencechars=`shuf -e $referencechars`
|
||||||
@@ -213,8 +207,8 @@ end
|
|||||||
@ prompt_hsym = ${prompt_hsym} + 1
|
@ prompt_hsym = ${prompt_hsym} + 1
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
if( $?CSHENV_DEBUG ) then
|
||||||
echo ${prompt_hcolor} ${prompt_hsym}
|
_debug ${prompt_hcolor} ${prompt_hsym}
|
||||||
echo "Setting prompt"
|
_debug "Setting prompt"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
@@ -328,9 +322,7 @@ set date_prompt_view=""
|
|||||||
set battery_prompt_view=""
|
set battery_prompt_view=""
|
||||||
set internal_bracket_view=""
|
set internal_bracket_view=""
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "About to setup prompt members, with disable checks"
|
||||||
echo "About to setup prompt members, with disable checks"
|
|
||||||
endif
|
|
||||||
|
|
||||||
if( ! $?CSHENV_DISABLE_PROMPT_SIGIL ) then
|
if( ! $?CSHENV_DISABLE_PROMPT_SIGIL ) then
|
||||||
set prompt_reference_view="${prompt_reference}"
|
set prompt_reference_view="${prompt_reference}"
|
||||||
@@ -352,9 +344,8 @@ if( ! $?CSHENV_DISABLE_PROMPT_NESTING ) then
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
|
||||||
echo "Up to the user and host checks..."
|
_debug "Up to the user and host checks..."
|
||||||
endif
|
|
||||||
set host_prompt_tail=": "
|
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}%}"
|
||||||
@@ -384,9 +375,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_DIRS ) then
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Up to the time, date, and battery checks..."
|
||||||
echo "Up to the time, date, and battery checks..."
|
|
||||||
endif
|
|
||||||
if( ! $?CSHENV_DISABLE_PROMPT_TIME ) then
|
if( ! $?CSHENV_DISABLE_PROMPT_TIME ) then
|
||||||
set time_prompt_view="%{${time_color_seq}%}${time_prompt}%{${sgr_reset}%}"
|
set time_prompt_view="%{${time_color_seq}%}${time_prompt}%{${sgr_reset}%}"
|
||||||
endif
|
endif
|
||||||
@@ -397,9 +386,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_BATTERY ) then
|
|||||||
set battery_prompt_view="${battery_prefix}${battery_prompt}"
|
set battery_prompt_view="${battery_prefix}${battery_prompt}"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Doing the internal bracket setup..."
|
||||||
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}"
|
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
|
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 "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}-"
|
||||||
|
|||||||
+3
-9
@@ -1,12 +1,8 @@
|
|||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Running tcshrc.system..."
|
||||||
echo "Running tcshrc.system..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
setenv CSHENV_SYSTEM `uname`
|
setenv CSHENV_SYSTEM `uname`
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug 'Initially detected that you are running on a "'${CSHENV_SYSTEM}'" system'
|
||||||
echo 'Initially detected that you are running on a "'${CSHENV_SYSTEM}'" system'
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -15,9 +11,7 @@ endif
|
|||||||
#setenv CSHENV_SYSTEM Cygwin
|
#setenv CSHENV_SYSTEM Cygwin
|
||||||
#endsw
|
#endsw
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug 'Detected that you are running on a "'${CSHENV_SYSTEM}'" system'
|
||||||
echo 'Detected that you are running on a "'${CSHENV_SYSTEM}'" system'
|
|
||||||
endif
|
|
||||||
|
|
||||||
|
|
||||||
# Source the common bits, since many systems often have lots in common.
|
# Source the common bits, since many systems often have lots in common.
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Sourcing tcshrc.system.Darwin..."
|
||||||
echo "Sourcing tcshrc.system.Darwin..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Set the acknowledgement bit, essentially
|
# Set the acknowledgement bit, essentially
|
||||||
setenv CSHENV_SYSTEM_CONFIGURED Darwin
|
setenv CSHENV_SYSTEM_CONFIGURED Darwin
|
||||||
@@ -21,9 +19,7 @@ setenv INFOPATH /opt/homebrew/share/info`test ${?INFOPATH} -eq 1 && echo :${INFO
|
|||||||
|
|
||||||
alias printf gprintf
|
alias printf gprintf
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Done sourcing tcshrc.system.Darwin..."
|
||||||
echo "Done sourcing tcshrc.system.Darwin..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# vim: ft=tcsh
|
# vim: ft=tcsh
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Sourcing tcshrc.system.FreeBSD..."
|
||||||
echo "Sourcing tcshrc.system.FreeBSD..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Set the acknowledgement bit, essentially
|
# Set the acknowledgement bit, essentially
|
||||||
setenv CSHENV_SYSTEM_CONFIGURED FreeBSD
|
setenv CSHENV_SYSTEM_CONFIGURED FreeBSD
|
||||||
@@ -10,9 +8,7 @@ setenv PAGER less
|
|||||||
|
|
||||||
alias printf gprintf
|
alias printf gprintf
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Done sourcing tcshrc.system.FreeBSD..."
|
||||||
echo "Done sourcing tcshrc.system.FreeBSD..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# vim: ft=tcsh
|
# vim: ft=tcsh
|
||||||
|
|||||||
+2
-6
@@ -1,6 +1,4 @@
|
|||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Sourcing tcshrc.system.Linux..."
|
||||||
echo "Sourcing tcshrc.system.Linux..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
unsetenv CSHENV_BATTERY_DEVICE
|
unsetenv CSHENV_BATTERY_DEVICE
|
||||||
unsetenv CSHENV_SHOW_BATTERY_LEVEL
|
unsetenv CSHENV_SHOW_BATTERY_LEVEL
|
||||||
@@ -12,9 +10,7 @@ end
|
|||||||
# Set the acknowledgement bit, essentially
|
# Set the acknowledgement bit, essentially
|
||||||
setenv CSHENV_SYSTEM_CONFIGURED Linux
|
setenv CSHENV_SYSTEM_CONFIGURED Linux
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Done sourcing tcshrc.system.Linux..."
|
||||||
echo "Done sourcing tcshrc.system.Linux..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# vim: ft=tcsh
|
# vim: ft=tcsh
|
||||||
|
|||||||
+18
-51
@@ -1,15 +1,11 @@
|
|||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Sourcing tcshrc.system.common"
|
||||||
echo "Sourcing tcshrc.system.common"
|
|
||||||
endif
|
|
||||||
|
|
||||||
set uname=`uname`
|
set uname=`uname`
|
||||||
set uname_a=`uname -a`
|
set uname_a=`uname -a`
|
||||||
set uname_p=`uname -p`
|
set uname_p=`uname -p`
|
||||||
set uname_m=`uname -m`
|
set uname_m=`uname -m`
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Setting uname -i tracker, based upon OS."
|
||||||
echo "Setting uname -i tracker, based upon OS."
|
|
||||||
endif
|
|
||||||
|
|
||||||
switch( ${CSHENV_SYSTEM} )
|
switch( ${CSHENV_SYSTEM} )
|
||||||
case Cygwin:
|
case Cygwin:
|
||||||
@@ -27,48 +23,37 @@ switch( ${CSHENV_SYSTEM} )
|
|||||||
breaksw
|
breaksw
|
||||||
endsw
|
endsw
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Setting CSHENV_BASESYSTEM..."
|
||||||
echo "Setting CSHENV_BASESYSTEM..."
|
|
||||||
endif
|
|
||||||
setenv CSHENV_BASESYSTEM "${uname}"
|
setenv CSHENV_BASESYSTEM "${uname}"
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Setting CSHENV_FULLSYSTEM..."
|
||||||
echo "Setting CSHENV_FULLSYSTEM..."
|
|
||||||
endif
|
|
||||||
setenv CSHENV_FULLSYSTEM "${uname_a}"
|
setenv CSHENV_FULLSYSTEM "${uname_a}"
|
||||||
|
_debug "Done setting CSHENV_FULLSYSTEM..."
|
||||||
|
|
||||||
switch ( ${CSHENV_SYSTEM} )
|
switch ( ${CSHENV_SYSTEM} )
|
||||||
|
|
||||||
case Cygwin:
|
case Cygwin:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Using a Cygwin system..."
|
||||||
echo "Using a Cygwin system..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
#Cygwin is like Linux, so we just...
|
#Cygwin is like Linux, so we just...
|
||||||
|
|
||||||
#FALLTHROUGH
|
#FALLTHROUGH
|
||||||
|
|
||||||
case Linux:
|
case Linux:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Using a Linux-like system (GLIBC, probably)..."
|
||||||
echo "Using a Linux-like system (GLIBC, probably)..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
setenv CSHENV_CPU "${uname_m}"
|
setenv CSHENV_CPU "${uname_m}"
|
||||||
setenv CSHENV_MACH "${uname_p}"
|
setenv CSHENV_MACH "${uname_p}"
|
||||||
|
|
||||||
switch( CSHENV_CPU )
|
switch( CSHENV_CPU )
|
||||||
case m68k:
|
case m68k:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Running on a m68k based CPU, tweaks for system."
|
||||||
echo "Running on a m68k based CPU, tweaks for system."
|
|
||||||
endif
|
|
||||||
|
|
||||||
setenv CSHENV_ARCH ${uname_p}
|
setenv CSHENV_ARCH ${uname_p}
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case armv71:
|
case armv71:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Running on an arm based CPU, tweaks for system."
|
||||||
echo "Running on an arm based CPU, tweaks for system."
|
|
||||||
endif
|
|
||||||
setenv CSHENV_ARCH arm
|
setenv CSHENV_ARCH arm
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
@@ -80,9 +65,7 @@ switch ( ${CSHENV_SYSTEM} )
|
|||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case Darwin:
|
case Darwin:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Using a Darwin/MacosX system..."
|
||||||
echo "Using a Darwin/MacosX system..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
setenv CSHENV_CPU ${uname_p}
|
setenv CSHENV_CPU ${uname_p}
|
||||||
setenv CSHENV_MACH ${uname_m}
|
setenv CSHENV_MACH ${uname_m}
|
||||||
@@ -92,9 +75,7 @@ switch ( ${CSHENV_SYSTEM} )
|
|||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
case FreeBSD:
|
case FreeBSD:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Using a FreeBSD system..."
|
||||||
echo "Using a FreeBSD system..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
setenv CSHENV_CPU ${uname_p}
|
setenv CSHENV_CPU ${uname_p}
|
||||||
setenv CSHENV_MACH ${uname_m}
|
setenv CSHENV_MACH ${uname_m}
|
||||||
@@ -108,56 +89,42 @@ switch ( ${CSHENV_SYSTEM} )
|
|||||||
breaksw
|
breaksw
|
||||||
endsw
|
endsw
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Detecting hostname hacks needed."
|
||||||
echo "Detecting hostname hacks needed."
|
|
||||||
endif
|
|
||||||
|
|
||||||
switch( ${CSHENV_SYSTEM} )
|
switch( ${CSHENV_SYSTEM} )
|
||||||
|
|
||||||
#Broken or Non-BSD like hostname commands:
|
#Broken or Non-BSD like hostname commands:
|
||||||
case Cygwin:
|
case Cygwin:
|
||||||
case SunOS:
|
case SunOS:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "SYSV hostname hack."
|
||||||
echo "SYSV hostname hack."
|
|
||||||
endif
|
|
||||||
|
|
||||||
setenv CSHENV_HOSTNAME `hostname | tr "[:upper:]" "[:lower:]"`
|
setenv CSHENV_HOSTNAME `hostname | tr "[:upper:]" "[:lower:]"`
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
#Linux may be different, yet still
|
#Linux may be different, yet still
|
||||||
case Linux:
|
case Linux:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "BSD-like hostname hack."
|
||||||
echo "BSD-like hostname hack."
|
|
||||||
endif
|
|
||||||
|
|
||||||
setenv CSHENV_HOSTNAME `hostname | tr "[:upper:]" "[:lower:]"`
|
setenv CSHENV_HOSTNAME `hostname | tr "[:upper:]" "[:lower:]"`
|
||||||
breaksw
|
breaksw
|
||||||
|
|
||||||
#BSD like hostnames, and non-broken ones.
|
#BSD like hostnames, and non-broken ones.
|
||||||
default:
|
default:
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "BSD-like hostname hack."
|
||||||
echo "BSD-like hostname hack."
|
|
||||||
endif
|
|
||||||
|
|
||||||
setenv CSHENV_HOSTNAME `hostname -s| tr "[:upper:]" "[:lower:]"`
|
setenv CSHENV_HOSTNAME `hostname -s| tr "[:upper:]" "[:lower:]"`
|
||||||
breaksw
|
breaksw
|
||||||
endsw
|
endsw
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Hostname detected as ${CSHENV_HOSTNAME}..."
|
||||||
echo "Hostname detected as ${CSHENV_HOSTNAME}..."
|
|
||||||
endif
|
|
||||||
|
|
||||||
if( $?CSHENV_VIRTUAL_HOSTNAME ) then
|
if( $?CSHENV_VIRTUAL_HOSTNAME ) then
|
||||||
setenv CSHENV_HOSTNAME ${CSHENV_VIRTUAL_HOSTNAME}
|
setenv CSHENV_HOSTNAME ${CSHENV_VIRTUAL_HOSTNAME}
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Hostname overriden as ${CSHENV_HOSTNAME}..."
|
||||||
echo "Hostname overriden as ${CSHENV_HOSTNAME}..."
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
if( $?CSHENV_DEBUG ) then
|
_debug "Done sourcing tcshrc.system.common"
|
||||||
echo "Done sourcing tcshrc.system.common"
|
|
||||||
endif
|
|
||||||
|
|
||||||
###########################
|
###########################
|
||||||
# vim: ft=tcsh
|
# vim: ft=tcsh
|
||||||
|
|||||||
Reference in New Issue
Block a user