|
@@ -10,9 +10,14 @@ fi
|
|
|
|
|
|
# Protect against unwanted sourcing
|
|
# Protect against unwanted sourcing
|
|
case "$ZSH_EVAL_CONTEXT" in
|
|
case "$ZSH_EVAL_CONTEXT" in
|
|
- *:file) echo "error: this file should not be sourced" && return ;;
|
|
|
|
|
|
+ *:file) echo "error: this file should not be sourced" && return 1 ;;
|
|
esac
|
|
esac
|
|
|
|
|
|
|
|
+# Define "$ZSH" if not defined -- in theory this should be `export`ed by the calling script
|
|
|
|
+if [[ -z "$ZSH" ]]; then
|
|
|
|
+ ZSH="${0:a:h:h}"
|
|
|
|
+fi
|
|
|
|
+
|
|
cd "$ZSH"
|
|
cd "$ZSH"
|
|
|
|
|
|
verbose_mode="default"
|
|
verbose_mode="default"
|