Added settings variables to allow date and docker display to be made conditional

This commit is contained in:
Sven A. Schmidt 2016-06-07 08:31:34 +01:00
parent 43af67f68a
commit d730526c07
3 changed files with 7 additions and 4 deletions

View File

@ -68,12 +68,14 @@ set -g theme_display_git_untracked no
set -g theme_display_git_ahead_verbose yes
set -g theme_git_worktree_support yes
set -g theme_display_vagrant yes
set -g theme_display_docker_machine no
set -g theme_display_hg yes
set -g theme_display_virtualenv no
set -g theme_display_ruby no
set -g theme_display_user yes
set -g theme_display_vi yes
set -g theme_display_vi_hide_mode default
set -g theme_display_date no
set -g theme_title_display_process yes
set -g theme_title_display_path no
set -g theme_title_use_abbreviated_path no

View File

@ -293,10 +293,9 @@ function __bobthefish_prompt_vagrant_vmware -S -d 'Display VMWare Vagrant status
end
function __bobthefish_prompt_docker -S
if set -q DOCKER_MACHINE_NAME
__bobthefish_start_segment $__bobthefish_vagrant fff --bold
echo -ns $DOCKER_MACHINE_NAME ' '
end
[ "$theme_display_docker_machine" = 'no' -o -z "$DOCKER_MACHINE_NAME" ]; and return
__bobthefish_start_segment $__bobthefish_vagrant fff --bold
echo -ns $DOCKER_MACHINE_NAME ' '
set_color normal
end

View File

@ -25,6 +25,7 @@ function __bobthefish_cmd_duration -S -d 'Show command duration'
end
function __bobthefish_timestamp -S -d 'Show the current timestamp'
[ "$theme_display_date" = "no" ]; and return
set -q theme_date_format
or set -l theme_date_format "+%c"
@ -41,5 +42,6 @@ function fish_right_prompt -d 'bobthefish is all about the right prompt'
set_color $fish_color_autosuggestion
__bobthefish_cmd_duration
__bobthefish_timestamp
set_color normal
end