mirror of
https://github.com/oh-my-fish/theme-bobthefish.git
synced 2024-10-27 20:34:23 +00:00
Merge 8dacb66d17
into 05c0765c4e
This commit is contained in:
commit
8743b1c912
@ -80,6 +80,7 @@ set -g theme_git_worktree_support yes
|
||||
set -g theme_use_abbreviated_branch_name yes
|
||||
set -g theme_display_vagrant yes
|
||||
set -g theme_display_docker_machine no
|
||||
set -g theme_display_docker_context no
|
||||
set -g theme_display_k8s_context yes
|
||||
set -g theme_display_hg yes
|
||||
set -g theme_display_virtualenv no
|
||||
|
@ -28,6 +28,7 @@
|
||||
# set -g theme_git_worktree_support yes
|
||||
# set -g theme_display_vagrant yes
|
||||
# set -g theme_display_docker_machine no
|
||||
# set -g theme_display_docker_context no
|
||||
# set -g theme_display_k8s_context yes
|
||||
# set -g theme_display_k8s_namespace no
|
||||
# set -g theme_display_aws_vault_profile yes
|
||||
@ -599,6 +600,17 @@ function __bobthefish_prompt_docker -S -d 'Display Docker machine name'
|
||||
echo -ns $DOCKER_MACHINE_NAME ' '
|
||||
end
|
||||
|
||||
function __bobthefish_prompt_docker_context -S -d 'Display Docker context'
|
||||
[ "$theme_display_docker_context" = 'no' ]
|
||||
and return
|
||||
set -l docker_context (docker context inspect -f '{{.Name}}')
|
||||
[ "$docker_context" = 'default' -o -z "docker_context" ]
|
||||
and return
|
||||
|
||||
__bobthefish_start_segment $color_vagrant
|
||||
echo -ns $docker_context ' '
|
||||
end
|
||||
|
||||
function __bobthefish_k8s_context -S -d 'Get the current k8s context'
|
||||
set -l config_paths "$HOME/.kube/config"
|
||||
[ -n "$KUBECONFIG" ]
|
||||
@ -1165,6 +1177,7 @@ function fish_prompt -d 'bobthefish, a fish theme optimized for awesome'
|
||||
# Containers and VMs
|
||||
__bobthefish_prompt_vagrant
|
||||
__bobthefish_prompt_docker
|
||||
__bobthefish_prompt_docker_context
|
||||
__bobthefish_prompt_k8s_context
|
||||
|
||||
# Cloud Tools
|
||||
|
Loading…
Reference in New Issue
Block a user