detect script directory to make bash and zsh usable without having `powerline` in `$PATH`
This commit is contained in:
parent
540b076aa0
commit
441f17464c
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue