]> arthur.barton.de Git - ax-zsh.git/blobdiff - ax.zsh
Setup $PATH on 1st run only
[ax-zsh.git] / ax.zsh
diff --git a/ax.zsh b/ax.zsh
index 88c16bd79bcbf9853b3a13f2a3d3e1cbd396c7bf..de39ad8499b52bcd9527d489b20b436d0c9e33e2 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -68,6 +68,16 @@ function axzsh_load_plugin {
        return 0
 }
 
+# Make sure that "my" (=ZSH) directory is in the search path ...
+if [[ -z "$AXZSH" ]]; then
+       _p="${0:h}"
+       [[ "$_p" != "." ]] && PATH="$PATH:${0:h}"
+       unset _p
+fi
+
+# Make sure that "SHELL" variable is set and exported
+[[ -n "$SHELL" ]] || export SHELL=$(command -v zsh)
+
 # Make sure that "AXZSH" variable is set and exported
 if [[ -z "$AXZSH" ]]; then
        export AXZSH="$HOME/.axzsh"