Use $0 to get execution path

$_ is "The last argument of the previous command." (cf. man zshparam) on
zsh, so SRC will be "]".
This commit is contained in:
Fumiya Chiba
2015-04-15 20:42:18 +09:00
parent 3bea227bf9
commit 3bf41eba42

View File

@@ -17,7 +17,7 @@
SRC="$BASH_SOURCE"
if [ "$SRC" = "" ]; then
SRC="$_"
SRC="$0"
fi
pushd `dirname "$SRC"` > /dev/null
unset SRC