From 67bc90d291cbc72d0ff0af6b3416e2e2353119bd Mon Sep 17 00:00:00 2001 From: Justin Hileman Date: Fri, 4 May 2018 05:46:14 -0700 Subject: [PATCH] Disable Kubernetes segment by default It turns out lots of people have a default kube context because they used Google Cloud SDK or something once. It doesn't really hurt to leave it there, but showing all these (reeeallllly long) kube context segments is confusing people. If you really want to show your kube context, set `theme_display_k8s_context` to `yes`. See #141, #147, #153, etc. --- README.md | 4 ++-- fish_prompt.fish | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d1aa885..c4af073 100644 --- a/README.md +++ b/README.md @@ -113,10 +113,10 @@ set -g theme_newline_cursor yes - `theme_display_ruby`. Use `no` to completely hide all information about Ruby version. By default Ruby version displayed if there is the difference from default settings. - `theme_display_vagrant`. This feature is disabled by default, use `yes` to display Vagrant status in your prompt. Please note that only the VirtualBox and VMWare providers are supported. - `theme_display_vi`. By default the vi mode indicator will be shown if vi or hybrid key bindings are enabled. Use `no` to hide the indicator, or `yes` to show the indicator. -- `theme_display_k8s_context`. By default the current kubernetes context is shown (`> kubectl config current-context`). Use `no` to hide the context. +- `theme_display_k8s_context`. This feature is disabled by default. Use `yes` to show the current kubernetes context (`> kubectl config current-context`). - `theme_display_user`. If set to `yes`, display username always, if set to `ssh`, only when an SSH-Session is detected, if set to no, never. - `theme_display_hostname`. Same behaviour as `theme_display`. -- `theme_show_exit_status`. Set this option to yes to have the prompt show the last exit code if it was non_zero instead of just the exclamation mark. +- `theme_show_exit_status`. Set this option to `yes` to have the prompt show the last exit code if it was non_zero instead of just the exclamation mark. - `theme_git_worktree_support`. If you do any git worktree shenanigans, setting this to `yes` will fix incorrect project-relative path display. If you don't do any git worktree shenanigans, leave it disabled. It's faster this way :) - `fish_prompt_pwd_dir_length`. bobthefish respects the Fish `$fish_prompt_pwd_dir_length` setting to abbreviate the prompt path. Set to `0` to show the full path, `1` (default) to show only the first character of each parent directory name, or any other number to show up to that many characters. - `theme_project_dir_length`. The same as `$fish_prompt_pwd_dir_length`, but for the path relative to the current project root. Defaults to `0`; set to any other number to show an abbreviated path. diff --git a/fish_prompt.fish b/fish_prompt.fish index 520f27e..eed7fd8 100644 --- a/fish_prompt.fish +++ b/fish_prompt.fish @@ -26,7 +26,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_k8s_context no +# set -g theme_display_k8s_context yes # set -g theme_display_hg yes # set -g theme_display_virtualenv no # set -g theme_display_ruby no @@ -508,7 +508,7 @@ function __bobthefish_prompt_docker -S -d 'Display Docker machine name' end function __bobthefish_prompt_k8s_context -S -d 'Show current Kubernetes context' - [ "$theme_display_k8s_context" = 'no' ]; and return + [ "$theme_display_k8s_context" = 'yes' ]; or return set -l config_paths "$HOME/.kube/config" [ -n "$KUBECONFIG" ]