Support hiding of vi segment for special mode

This commit is contained in:
Oliver Schrenk 2015-11-20 15:54:31 +01:00
parent 92691a3c4e
commit 5314f8876a

View File

@ -20,6 +20,7 @@
# set -g theme_display_ruby no # set -g theme_display_ruby no
# set -g theme_display_user yes # set -g theme_display_user yes
# set -g theme_display_vi no # set -g theme_display_vi no
# set -g theme_display_vi_hide_mode default
# set -g theme_title_display_process yes # set -g theme_title_display_process yes
# set -g theme_title_display_path no # set -g theme_title_display_path no
# set -g theme_date_format "+%a %H:%M" # set -g theme_date_format "+%a %H:%M"
@ -369,8 +370,8 @@ function __bobthefish_prompt_dir -d 'Display a shortened form of the current dir
end end
function __bobthefish_prompt_vi -d 'Display vi mode' function __bobthefish_prompt_vi -d 'Display vi mode'
[ "$theme_display_vi" = 'no' ]; and return if [ "$theme_display_vi" = 'yes' ]
set -l vi_mode if [ "$fish_bind_mode" != "$theme_display_vi_hide_mode" ]
switch $fish_bind_mode switch $fish_bind_mode
case default case default
__bobthefish_start_segment $__bobthefish_med_grey $__bobthefish_dk_grey --bold __bobthefish_start_segment $__bobthefish_med_grey $__bobthefish_dk_grey --bold
@ -384,6 +385,8 @@ function __bobthefish_prompt_vi -d 'Display vi mode'
end end
set_color normal set_color normal
end end
end
end
function __bobthefish_virtualenv_python_version -d 'Get current python version' function __bobthefish_virtualenv_python_version -d 'Get current python version'
set -l python_version (readlink (which python)) set -l python_version (readlink (which python))