New safe_source logic.

This commit is contained in:
2026-06-23 19:09:28 -04:00
parent c37ae62f1d
commit a75180f622
+5 -1
View File
@@ -53,10 +53,14 @@ endif
_debug "Setting up optional sourcing mechanism." _debug "Setting up optional sourcing mechanism."
# This safe_source alias is incredibly delicate. It drives the whole # This safe_source alias is incredibly delicate. It drives the whole
# optional sourcing mechanism -- DO NOT MESS WITH IT! # optional sourcing mechanism -- DO NOT MESS WITH IT!
alias safe_source 'eval "if ( -f \!:1 ) then \\ alias old_safe_source 'eval "if ( -f \!:1 ) then \\
source \!:1 \\ source \!:1 \\
endif"' endif"'
alias new_safe_source "test -f \!:1 && source \!:1"
alias safe_source new_safe_source
_debug "Setting up optional session sourcing mechanism." _debug "Setting up optional session sourcing mechanism."
# These reload_session and `__load_session` aliases ar incredibly delicate. They drives # These reload_session and `__load_session` aliases ar incredibly delicate. They drives
# the whole optional session mechanism -- DO NOT MESS WITH IT LIGHTLY! # the whole optional session mechanism -- DO NOT MESS WITH IT LIGHTLY!