diff options
| author | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2026-06-06 12:27:03 -0400 |
|---|---|---|
| committer | Douglas B. Rumbaugh <doug@douglasrumbaugh.com> | 2026-06-06 12:27:03 -0400 |
| commit | 0ecfe53b2d271133fac36de11ecfc0f7e47840f0 (patch) | |
| tree | 3ee8b5188936e350e15ff851b07a33031d366389 /ves-show.sh | |
| parent | 04b385284a8559bde3df51bab950784a0fd28cfd (diff) | |
| download | sh-ves-0ecfe53b2d271133fac36de11ecfc0f7e47840f0.tar.gz | |
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
Diffstat (limited to 'ves-show.sh')
| -rw-r--r-- | ves-show.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/ves-show.sh b/ves-show.sh new file mode 100644 index 0000000..b50487a --- /dev/null +++ b/ves-show.sh @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Print the variables stored in an sh-ves environment, one VAR=value per +# line. With no argument, shows the currently active environment. +# +ves_show() { + env="" + if [ "$#" -ge 1 ]; then + env="$1" + fi + + if ! env=$(_shves_resolve_env "$env"); then + return 1 + fi + + while IFS= read -r line; do + case $line in + export_var:*) + printf "%s\n" "${line#export_var:}" + ;; + esac + done < "$SHVES_ENV_DIR/$env" + + return 0 +} |