show kubernetes context

This commit is contained in:
Tanner Bruce 2017-10-17 13:31:15 -05:00
parent 4e602d98d7
commit 9c6020543f
2 changed files with 8 additions and 0 deletions

View File

@ -73,6 +73,7 @@ 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_kubernetes no
set -g theme_display_hg yes
set -g theme_display_virtualenv no
set -g theme_display_ruby no

View File

@ -384,6 +384,12 @@ function __bobthefish_prompt_docker -S -d 'Show docker machine name'
echo -ns $DOCKER_MACHINE_NAME ' '
end
function __bobthefish_prompt_kubernetes -S -d 'Show the current kubernetes context'
[ "$theme_display_kubernetes" = 'no' -o -z (command -s kubectl) ]; and return
__bobthefish_start_segment $__color_vagrant
echo -ns (kubectl config current-context) ' '
end
function __bobthefish_prompt_status -S -a last_status -d 'Display symbols for a non zero exit status, root and background jobs'
set -l nonzero
set -l superuser
@ -1372,6 +1378,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
__bobthefish_prompt_vi
__bobthefish_prompt_vagrant
__bobthefish_prompt_docker
__bobthefish_prompt_kubernetes
__bobthefish_prompt_user
__bobthefish_prompt_rubies
__bobthefish_prompt_virtualfish