From 0ecfe53b2d271133fac36de11ecfc0f7e47840f0 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Sat, 6 Jun 2026 12:27:03 -0400 Subject: Initial version complete I dusted this off after years and had Claude finish it for me. caveat emptor: this is largely (though not entirely) LLM generated as of this commit --- ves-deactivate.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) mode change 100644 => 100755 ves-deactivate.sh (limited to 'ves-deactivate.sh') diff --git a/ves-deactivate.sh b/ves-deactivate.sh old mode 100644 new mode 100755 index 1a24852..3937f93 --- a/ves-deactivate.sh +++ b/ves-deactivate.sh @@ -1 +1,20 @@ #!/bin/sh +# +# Deactivate the currently active sh-ves environment, restoring all +# overridden variables to the values saved by ves_activate. +# +ves_deactivate() { + if [ -z "$SHVES_ENV_NM" ]; then + printf "ERROR: No environment is currently active.\n" >&2 + return 1 + fi + + for var in $SHVES_SAVED_VARS; do + _shves_restore_var "$var" + done + + unset SHVES_SAVED_VARS + unset SHVES_ENV_NM + + return 0 +} -- cgit v1.2.3