Merge pull request #528 from phunehehe/feature/527-zsh-bash-relative-path

Feature/527 zsh bash relative path
This commit is contained in:
ZyX-I 2014-01-10 09:55:11 -08:00
commit 759bf043dc
2 changed files with 7 additions and 2 deletions

View File

@ -1,8 +1,11 @@
if test -z "${POWERLINE_COMMAND}" ; then
if which powerline-client &>/dev/null ; then
export POWERLINE_COMMAND=powerline-client
else
elif which powerline &>/dev/null ; then
export POWERLINE_COMMAND=powerline
else
# `$0` is set to `-bash` when using SSH so that won't work
export POWERLINE_COMMAND="$(dirname "$BASH_SOURCE")/../../../scripts/powerline"
fi
fi

View File

@ -1,8 +1,10 @@
if test -z "${POWERLINE_COMMAND}" ; then
if which powerline-client &>/dev/null ; then
export POWERLINE_COMMAND=powerline-client
else
elif which powerline &>/dev/null ; then
export POWERLINE_COMMAND=powerline
else
export POWERLINE_COMMAND="$0:A:h:h:h:h/scripts/powerline"
fi
fi