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.
pull/154/head
Justin Hileman 6 years ago
parent 0cbeb3bc06
commit 67bc90d291

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

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

Loading…
Cancel
Save