show kubernetes context

pull/112/head
Tanner Bruce 7 years ago
parent 4e602d98d7
commit 9c6020543f

@ -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

@ -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

Loading…
Cancel
Save