aboutsummaryrefslogtreecommitdiffstats
path: root/ves-prompt.sh
diff options
context:
space:
mode:
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