Fix the case when $0 is a path

I.e. something like /home/zyx/.vam/powerline/tests/shell/path/mksh.
This commit is contained in:
ZyX 2015-02-21 13:46:35 +03:00
parent e6b3bff50a
commit 838a7c3b15
1 changed files with 1 additions and 2 deletions

View File

@ -224,8 +224,7 @@ fi
# Strips the leading `-`: it may be present when shell is a login shell
_POWERLINE_USED_SHELL=${0#-}
_POWERLINE_USED_SHELL=${_POWERLINE_USED_SHELL#/usr}
_POWERLINE_USED_SHELL=${_POWERLINE_USED_SHELL#/bin/}
_POWERLINE_USED_SHELL=${_POWERLINE_USED_SHELL##*/}
if "${POWERLINE_CONFIG_COMMAND}" shell uses tmux ; then
_powerline_init_tmux_support $_POWERLINE_USED_SHELL