Invoking the `kubectl` command can be expensive, and since there's not a
lot of time to play with when rendering the prompt without it feeling
slugging, make the namespace fetching optional.
Apparently it is super annoying and not really useful, since it executes in the background every time you change directories, so there is always a "background job" right when the prompt is rendered.
This relies on the AUTOJUMP_SOURCED environment variable to opt users into this behavior, since it would be a bit slower for every user every time we render the prompt.
Fixes#169
The status needs to be saved before anything else is done, otherwise it will get
overwritten. Since commit ac45a5cb95 this was the case with the `if` block in
a way that `last_status` was always `0`.
Dumb terminals don't like this fancy prompt.
This is a really a workaround for loading the theme on demand, but it greatly
simplifies managing plugins and allows just relying on current plugin managers.
Because bobthefish interacts so much with external commands like git and hg, which resolve symlinks and don't do case folding on case-insensitive filesystems, we need to always use a normalized $PWD to compare paths.
Fixes#191Fixes#181
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.
- Improve performance significantly in the base case (i.e. when git or something isn't slowing it down anyway).
- Make `bobthefish_display_colors` a non-underscore function. It's meant for public use :)
- Support previewing _different_ color schemes via `bobthefish_display_colors`. Pass a color scheme name, or `--all` to preview everything.
- Make color overrides a bit fishier: use a `bobthefish_colors` function to override color schemes, rather than declaring a whole pile of variables.
- Add support for a base color scheme in `bobthefish_colors`, in case you don't want to override everything.
- Add a deprecation notice with upgrade instructions for users with old-style custom color schemes.