All the debugging I could find.

This commit is contained in:
2026-06-23 19:09:17 -04:00
parent c1ac83d115
commit 920493abee
8 changed files with 41 additions and 106 deletions
+3 -1
View File
@@ -11,7 +11,9 @@ if( $?CSHENV_DEBUG ) then
echo "Set CSHENV_DIR to: " ${CSHENV_DIR}
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_MEASUREMENT en_US.UTF-8
+1 -3
View File
@@ -132,9 +132,7 @@ set date_prompt="%{%Y-%W-%D%}"
set time_prompt="%{%P%}"
#unset edit
if( $?CSHENV_DEBUG ) then
echo "Building Cool prompt"
endif
_debug "Building Cool prompt"
set depth_prompt="(${shlvl})"
+10 -24
View File
@@ -12,9 +12,7 @@
# echo "Loaded prompt session information."
#endif
if( $?CSHENV_DEBUG ) then
echo "Setting up dynamic colour loading..."
endif
_debug "Setting up dynamic colour loading..."
# Recompute cached sgr codes from any configuration updates
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%}"
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 )
if( $?CSHENV_DEBUG ) then
echo colorshuffle
endif
_debug colorshuffle
#echo 
# Shuffle, if supported
if( $?CSHENV_DETECTED_SHUF ) then
@@ -189,9 +185,7 @@ end
while( ${prompt_hsym} == 0 )
if( $?CSHENV_DEBUG ) then
echo symbolshuffle
endif
_debug symbolshuffle
#echo 
if( $?CSHENV_DETECTED_SHUF ) then
set referencechars=`shuf -e $referencechars`
@@ -213,8 +207,8 @@ end
@ prompt_hsym = ${prompt_hsym} + 1
if( $?CSHENV_DEBUG ) then
echo ${prompt_hcolor} ${prompt_hsym}
echo "Setting prompt"
_debug ${prompt_hcolor} ${prompt_hsym}
_debug "Setting prompt"
endif
@@ -330,9 +324,7 @@ 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
_debug "About to setup prompt members, with disable checks"
if( ! $?CSHENV_DISABLE_PROMPT_SIGIL ) then
set prompt_reference_view="${prompt_reference}"
@@ -358,9 +350,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_ENV_VIEW ) then
set cshenv_prompt_view="%{${cshenv_prompt}%}"
endif
if( $?CSHENV_DEBUG ) then
echo "Up to the user and host checks..."
endif
_debug "Up to the user and host checks..."
set host_prompt_tail=": "
if( ! $?CSHENV_DISABLE_PROMPT_USER ) then
set user_prompt_view="${user_color_seq}${user_prompt}%{${sgr_reset}%}"
@@ -390,9 +380,7 @@ if( ! $?CSHENV_DISABLE_PROMPT_DIRS ) then
endif
endif
if( $?CSHENV_DEBUG ) then
echo "Up to the time, date, and battery checks..."
endif
_debug "Up to the time, date, and battery checks..."
if( ! $?CSHENV_DISABLE_PROMPT_TIME ) then
set time_prompt_view="%{${time_color_seq}%}${time_prompt}%{${sgr_reset}%}"
endif
@@ -403,9 +391,7 @@ 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
_debug "Doing the internal bracket setup..."
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}-"
+3 -9
View File
@@ -1,12 +1,8 @@
if( $?CSHENV_DEBUG ) then
echo "Running tcshrc.system..."
endif
_debug "Running tcshrc.system..."
setenv CSHENV_SYSTEM `uname`
if( $?CSHENV_DEBUG ) then
echo 'Initially detected that you are running on a "'${CSHENV_SYSTEM}'" system'
endif
_debug 'Initially detected that you are running on a "'${CSHENV_SYSTEM}'" system'
@@ -15,9 +11,7 @@ endif
#setenv CSHENV_SYSTEM Cygwin
#endsw
if( $?CSHENV_DEBUG ) then
echo 'Detected that you are running on a "'${CSHENV_SYSTEM}'" system'
endif
_debug 'Detected that you are running on a "'${CSHENV_SYSTEM}'" system'
# Source the common bits, since many systems often have lots in common.
+2 -6
View File
@@ -1,6 +1,4 @@
if( $?CSHENV_DEBUG ) then
echo "Sourcing tcshrc.system.Darwin..."
endif
_debug "Sourcing tcshrc.system.Darwin..."
# Set the acknowledgement bit, essentially
setenv CSHENV_SYSTEM_CONFIGURED Darwin
@@ -21,9 +19,7 @@ setenv INFOPATH /opt/homebrew/share/info`test ${?INFOPATH} -eq 1 && echo :${INFO
alias printf gprintf
if( $?CSHENV_DEBUG ) then
echo "Done sourcing tcshrc.system.Darwin..."
endif
_debug "Done sourcing tcshrc.system.Darwin..."
###########################
# vim: ft=tcsh
+2 -6
View File
@@ -1,6 +1,4 @@
if( $?CSHENV_DEBUG ) then
echo "Sourcing tcshrc.system.FreeBSD..."
endif
_debug "Sourcing tcshrc.system.FreeBSD..."
# Set the acknowledgement bit, essentially
setenv CSHENV_SYSTEM_CONFIGURED FreeBSD
@@ -10,9 +8,7 @@ setenv PAGER less
alias printf gprintf
if( $?CSHENV_DEBUG ) then
echo "Done sourcing tcshrc.system.FreeBSD..."
endif
_debug "Done sourcing tcshrc.system.FreeBSD..."
###########################
# vim: ft=tcsh
+2 -6
View File
@@ -1,6 +1,4 @@
if( $?CSHENV_DEBUG ) then
echo "Sourcing tcshrc.system.Linux..."
endif
_debug "Sourcing tcshrc.system.Linux..."
unsetenv CSHENV_BATTERY_DEVICE
unsetenv CSHENV_SHOW_BATTERY_LEVEL
@@ -12,9 +10,7 @@ end
# Set the acknowledgement bit, essentially
setenv CSHENV_SYSTEM_CONFIGURED Linux
if( $?CSHENV_DEBUG ) then
echo "Done sourcing tcshrc.system.Linux..."
endif
_debug "Done sourcing tcshrc.system.Linux..."
###########################
# vim: ft=tcsh
+18 -51
View File
@@ -1,15 +1,11 @@
if( $?CSHENV_DEBUG ) then
echo "Sourcing tcshrc.system.common"
endif
_debug "Sourcing tcshrc.system.common"
set uname=`uname`
set uname_a=`uname -a`
set uname_p=`uname -p`
set uname_m=`uname -m`
if( $?CSHENV_DEBUG ) then
echo "Setting uname -i tracker, based upon OS."
endif
_debug "Setting uname -i tracker, based upon OS."
switch( ${CSHENV_SYSTEM} )
case Cygwin:
@@ -27,48 +23,37 @@ switch( ${CSHENV_SYSTEM} )
breaksw
endsw
if( $?CSHENV_DEBUG ) then
echo "Setting CSHENV_BASESYSTEM..."
endif
_debug "Setting CSHENV_BASESYSTEM..."
setenv CSHENV_BASESYSTEM "${uname}"
if( $?CSHENV_DEBUG ) then
echo "Setting CSHENV_FULLSYSTEM..."
endif
_debug "Setting CSHENV_FULLSYSTEM..."
setenv CSHENV_FULLSYSTEM "${uname_a}"
_debug "Done setting CSHENV_FULLSYSTEM..."
switch ( ${CSHENV_SYSTEM} )
case Cygwin:
if( $?CSHENV_DEBUG ) then
echo "Using a Cygwin system..."
endif
_debug "Using a Cygwin system..."
#Cygwin is like Linux, so we just...
#FALLTHROUGH
case Linux:
if( $?CSHENV_DEBUG ) then
echo "Using a Linux-like system (GLIBC, probably)..."
endif
_debug "Using a Linux-like system (GLIBC, probably)..."
setenv CSHENV_CPU "${uname_m}"
setenv CSHENV_MACH "${uname_p}"
switch( CSHENV_CPU )
case m68k:
if( $?CSHENV_DEBUG ) then
echo "Running on a m68k based CPU, tweaks for system."
endif
_debug "Running on a m68k based CPU, tweaks for system."
setenv CSHENV_ARCH ${uname_p}
breaksw
case armv71:
if( $?CSHENV_DEBUG ) then
echo "Running on an arm based CPU, tweaks for system."
endif
_debug "Running on an arm based CPU, tweaks for system."
setenv CSHENV_ARCH arm
breaksw
@@ -80,9 +65,7 @@ switch ( ${CSHENV_SYSTEM} )
breaksw
case Darwin:
if( $?CSHENV_DEBUG ) then
echo "Using a Darwin/MacosX system..."
endif
_debug "Using a Darwin/MacosX system..."
setenv CSHENV_CPU ${uname_p}
setenv CSHENV_MACH ${uname_m}
@@ -92,9 +75,7 @@ switch ( ${CSHENV_SYSTEM} )
breaksw
case FreeBSD:
if( $?CSHENV_DEBUG ) then
echo "Using a FreeBSD system..."
endif
_debug "Using a FreeBSD system..."
setenv CSHENV_CPU ${uname_p}
setenv CSHENV_MACH ${uname_m}
@@ -108,56 +89,42 @@ switch ( ${CSHENV_SYSTEM} )
breaksw
endsw
if( $?CSHENV_DEBUG ) then
echo "Detecting hostname hacks needed."
endif
_debug "Detecting hostname hacks needed."
switch( ${CSHENV_SYSTEM} )
#Broken or Non-BSD like hostname commands:
case Cygwin:
case SunOS:
if( $?CSHENV_DEBUG ) then
echo "SYSV hostname hack."
endif
_debug "SYSV hostname hack."
setenv CSHENV_HOSTNAME `hostname | tr "[:upper:]" "[:lower:]"`
breaksw
#Linux may be different, yet still
case Linux:
if( $?CSHENV_DEBUG ) then
echo "BSD-like hostname hack."
endif
_debug "BSD-like hostname hack."
setenv CSHENV_HOSTNAME `hostname | tr "[:upper:]" "[:lower:]"`
breaksw
#BSD like hostnames, and non-broken ones.
default:
if( $?CSHENV_DEBUG ) then
echo "BSD-like hostname hack."
endif
_debug "BSD-like hostname hack."
setenv CSHENV_HOSTNAME `hostname -s| tr "[:upper:]" "[:lower:]"`
breaksw
endsw
if( $?CSHENV_DEBUG ) then
echo "Hostname detected as ${CSHENV_HOSTNAME}..."
endif
_debug "Hostname detected as ${CSHENV_HOSTNAME}..."
if( $?CSHENV_VIRTUAL_HOSTNAME ) then
setenv CSHENV_HOSTNAME ${CSHENV_VIRTUAL_HOSTNAME}
if( $?CSHENV_DEBUG ) then
echo "Hostname overriden as ${CSHENV_HOSTNAME}..."
endif
_debug "Hostname overriden as ${CSHENV_HOSTNAME}..."
endif
if( $?CSHENV_DEBUG ) then
echo "Done sourcing tcshrc.system.common"
endif
_debug "Done sourcing tcshrc.system.common"
###########################
# vim: ft=tcsh