From 90ae8d91ce5aef30631da30656a6f46266c21a70 Mon Sep 17 00:00:00 2001 From: Arno V Date: Fri, 3 Apr 2026 11:57:58 -0400 Subject: [PATCH] feat(envtools): add reload command to re-source shell environment in-place Co-Authored-By: Claude Opus 4.6 (1M context) --- packages/envtools/shell/functions/base.sh | 9 +++++++++ packages/envtools/shell/functions/custom.sh | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/envtools/shell/functions/base.sh b/packages/envtools/shell/functions/base.sh index 2be1ea24..2765483f 100644 --- a/packages/envtools/shell/functions/base.sh +++ b/packages/envtools/shell/functions/base.sh @@ -1,3 +1,12 @@ +# Reload the shell environment in-place (re-sources the entire envtools chain) +function reload() { + # shellcheck source=/dev/null + EVTLS_INIT_PARAM="reload" source "${EVTLS_SCRIPTPATH}/load.sh" + unset EVTLS_INIT_PARAM + echo + echo "Envtools reloaded!" +} + # # Test for shell types # diff --git a/packages/envtools/shell/functions/custom.sh b/packages/envtools/shell/functions/custom.sh index 2122aec0..7120df7f 100644 --- a/packages/envtools/shell/functions/custom.sh +++ b/packages/envtools/shell/functions/custom.sh @@ -1,5 +1,4 @@ # shellcheck source=/dev/null - if [ -f "${EVTLS_RUNTIME_DIR}/custom/functions.sh" ]; then source "${EVTLS_RUNTIME_DIR}/custom/functions.sh" fi