From: Alexander Barton Date: Fri, 21 Oct 2016 12:36:45 +0000 (+0200) Subject: Try harder to detect location of the AX-ZSH installation X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=1dc214566064ada0377195744c2e42e06e722709 Try harder to detect location of the AX-ZSH installation --- diff --git a/bin/axzshctl b/bin/axzshctl index 9d5eff0..b9d20d3 100755 --- a/bin/axzshctl +++ b/bin/axzshctl @@ -266,9 +266,12 @@ NAME="$0:t" [[ $# -gt 0 ]] || Usage -if [[ -z "$AXZSH" || ! -d "$AXZSH" ]]; then - ax_msg 2 "Oops, \"AXZSH\" is not set or invalid!" - exit 3 +if [[ -z "$AXZSH" || ! -r "$AXZSH/ax.zsh" ]]; then + [[ -r "$HOME/.axzsh/ax.zsh" ]] && AXZSH="$HOME/.axzsh" + if [[ ! -r "$AXZSH/ax.zsh" ]]; then + ax_msg 2 "Oops, \"AXZSH\" is not set or invalid and can't be autodetected!" + exit 3 + fi fi cmd="$1"