]> arthur.barton.de Git - ax-zsh.git/blobdiff - ax.zsh
30_hostname: Use hostnamectl(1) to get the "short" name when available
[ax-zsh.git] / ax.zsh
diff --git a/ax.zsh b/ax.zsh
index 1c43c890a7203aed6808ad5db2b4b17e9a6a4b54..de39ad8499b52bcd9527d489b20b436d0c9e33e2 100644 (file)
--- a/ax.zsh
+++ b/ax.zsh
@@ -45,6 +45,7 @@ function axzsh_load_plugin {
                        fname="$dname/init.zsh"
                else
                        echo "AX-ZSH plugin type of \"$plugin\" unknown, skipped!" >&2
+                       return 0
                fi
        fi
 
@@ -67,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"