Early return

This commit is contained in:
Oliver Schrenk 2015-11-22 12:53:49 +01:00
parent 5314f8876a
commit b094b1ec71

View File

@ -370,22 +370,19 @@ function __bobthefish_prompt_dir -d 'Display a shortened form of the current dir
end
function __bobthefish_prompt_vi -d 'Display vi mode'
if [ "$theme_display_vi" = 'yes' ]
if [ "$fish_bind_mode" != "$theme_display_vi_hide_mode" ]
switch $fish_bind_mode
case default
__bobthefish_start_segment $__bobthefish_med_grey $__bobthefish_dk_grey --bold
echo -n -s 'N '
case insert
__bobthefish_start_segment $__bobthefish_lt_green $__bobthefish_dk_grey --bold
echo -n -s 'I '
case visual
__bobthefish_start_segment $__bobthefish_lt_orange $__bobthefish_dk_grey --bold
echo -n -s 'V '
end
set_color normal
end
[ "$theme_display_vi" = 'yes' -a "$fish_bind_mode" != "$theme_display_vi_hide_mode" ]; or return
switch $fish_bind_mode
case default
__bobthefish_start_segment $__bobthefish_med_grey $__bobthefish_dk_grey --bold
echo -n -s 'N '
case insert
__bobthefish_start_segment $__bobthefish_lt_green $__bobthefish_dk_grey --bold
echo -n -s 'I '
case visual
__bobthefish_start_segment $__bobthefish_lt_orange $__bobthefish_dk_grey --bold
echo -n -s 'V '
end
set_color normal
end
function __bobthefish_virtualenv_python_version -d 'Get current python version'