aboutsummaryrefslogtreecommitdiffstats
path: root/ves-prompt.sh
diff options
context:
space:
mode:
authorDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2026-06-06 12:27:03 -0400
committerDouglas B. Rumbaugh <doug@douglasrumbaugh.com>2026-06-06 12:27:03 -0400
commit0ecfe53b2d271133fac36de11ecfc0f7e47840f0 (patch)
tree3ee8b5188936e350e15ff851b07a33031d366389 /ves-prompt.sh
parent04b385284a8559bde3df51bab950784a0fd28cfd (diff)
downloadsh-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-prompt.sh')
-rwxr-xr-x[-rw-r--r--]ves-prompt.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/ves-prompt.sh b/ves-prompt.sh
index 1d79373..c870db2 100644..100755
--- a/ves-prompt.sh
+++ b/ves-prompt.sh
@@ -1,4 +1,9 @@
#!/bin/sh
+#
+# Print a prompt fragment naming the active sh-ves environment, for
+# inclusion in a POSIX shell's PS1 string. Prints nothing when no
+# environment is active.
+#
if [ $# -lt 1 ]; then
sym="VENV"
@@ -6,6 +11,6 @@ else
sym="$1"
fi
-if [ ! -z "$SHVES_ENV_NM" ]; then
- printf "(%s %s)" "$sym" "$VES_ENV_NM"
+if [ -n "$SHVES_ENV_NM" ]; then
+ printf "(%s %s)" "$sym" "$SHVES_ENV_NM"
fi