Previously it would add `No` as the ruby version, which was factually correct but not at all what we were looking for. This omits the ruby segment entirely if the adsf plugin for ruby is not installed, or if there is no current ruby version specified.
Unfortunately this means we can't have a pretty arrow between the binding mode indicator and the rest of the prompt, but it's better than never updating the indicator :-/
Fixes#248
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.
This commit includes these new features:
- *A segment which displays OS type.* This is especially useful
if constantly logging into different computers with different
systems and you need to know if you need to type `apk`, `apt`,
`dnf`, or `yum`, for example. Enable it by setting the
`theme_display_currentos` variable to `yes`.
- *Padlock for SSH connection.* You may enable the padlock by
setting the `theme_display_ssh_keylock` to `yes`. Padlock is
shown only when accessing the terminal via a SSH session.
The padlock is displayed _before_ the hostname.
- *Split username and hostname segments.* This enable each segment
to be coloured with a different background. Set
`theme_display_split_user_hostname` to `yes` to enable this
feature.
- *Color root username differently.* When logged in as a `root`
user, background (or the color of the username) will change
to red. New colour has been added to the theme(s) for this
feature.
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.