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