Commit Graph

246 Commits

Author SHA1 Message Date
Justin Hileman
bd9d0e0f31 Add a $fish_private_mode indicator.
Fixes #263
2020-08-28 07:00:15 -07:00
Thibault Lacroux
a2ad38aa05 Do not display Kubernetes context and namespace if it's the defaults ones 2020-05-04 07:36:17 -07:00
Justin Hileman
870ab7c9be Fix some edge cases when nerd fonts are on and powerline fonts are explicitly disabled. 2020-05-02 09:19:59 -07:00
Duke Jones
e24516b39b Add theme_display_nix variable to other places. 2020-05-02 08:55:27 -07:00
Hans Larsen
aafed7cb24 Add nix prompt, glyph, and colors 2020-05-02 08:55:27 -07:00
Justin Hileman
1f24d5f217 Better ruby segment output when adsf is installed but not configured.
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.
2020-05-02 08:34:23 -07:00
Justin Hileman
7c2d90152e Handle whitespace in asdf system ruby detection.
Fixes #250
2020-05-02 08:29:34 -07:00
Justin Hileman
e4c6a5c434 Fix key binding mode indicator in newer Fish
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
2020-04-20 09:57:15 -07:00
Justin Hileman
9dd917535a Escape home directory used in regex, too! 2020-03-17 21:09:15 -07:00
Justin Hileman
0c3ae9f932 Fall back to unescaped strings in older Fish
Because that's a lot better than erroring out :)
2020-03-17 21:08:17 -07:00
Eric Moyer
46a89abb99 escape project_root_dir before using in regex 2020-03-16 20:10:42 -07:00
Justin Hileman
dbe3009b02
Merge pull request #214 from noseglid/master
Simplify kubernetes context fetching
2020-02-29 15:02:04 -08:00
Alexander Olsson
740150da19
Make displaying the k8s namespace optional
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.
2020-02-29 18:45:26 +01:00
Sergei Morozov
82a0a44cdc
In the prompt, show user info before everything else 2020-01-17 14:33:42 -08:00
Justin Hileman
f3301c2e2c Exclude autojump from the background job count
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
2019-11-02 15:48:16 -07:00
Justin Hileman
144eed0acc
Merge pull request #216 from FMeinicke/master
Add option to display sudo-username.
2019-10-27 21:15:05 -07:00
Florian Meinicke
5902e1a49d Don't start a new segment if either display_user' or display_sudo_user' is set 2019-10-27 19:28:55 +01:00
Florian Meinicke
108b6a45f6 Update condition for showing an extra space 2019-10-27 10:20:59 +01:00
Luca Filipozzi
9cb593e4fe
Update fish_prompt.fish 2019-10-26 21:01:54 -07:00
Florian Meinicke
981eb1a632 Add option to display sudo-username. 2019-10-21 18:51:56 +02:00
Justin Hileman
4e05b9d494 Show username when in a sudo shell
Fixes #170
2019-10-20 12:33:49 -07:00
Florian Meinicke
763e9454b2 Don't pay extra forking cost when config is disabled 2019-10-11 16:56:47 +02:00
Florian Meinicke
ce7e96fba5 Change option name to theme_show_jobs_verbose 2019-10-11 16:51:50 +02:00
Florian Meinicke
a3d43d35bd Add option to display the number of background jobs 2019-10-10 22:19:14 +02:00
Justin Hileman
cf096612c8 Stop truncating git branch names by default.
I used to think this was awesome, but have come around. The option is still there if you want it. Set `theme_use_abbreviated_branch_name` to `yes` :)
2019-10-02 14:51:34 -07:00
Sergei Morozov
5389a26442 Added the k8s namespace value to the prompt and the k8s icon to the segment (#208) 2019-07-01 12:21:31 -07:00
Alessandro Fazzi
1abb331c60 Add NVM prompt (#207)
* Add NVM prompt

* Do not show prompt when `system` node is used

* Change the glyph used for nvm prompt
2019-07-01 07:40:53 -07:00
Martin Kletzander
3b2e847fcc Fix status reporting (#197)
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`.
2019-03-28 21:13:12 -07:00
Justin Hileman
b9bc625059 Clean up theme_newline_prompt
No need for a variable, just echo. Allow setting $theme_newline_prompt to an empty string.
2019-03-26 08:13:33 -07:00
Thomas Flori
7d15e1ba1a allow colors in custom prompt 2019-03-26 08:13:03 -07:00
Thomas Flori
b9eb494dbf allow custom prompt in new line 2019-03-26 08:12:25 -07:00
Justin Hileman
ac45a5cb95 Minor cleanup 2019-03-26 07:52:05 -07:00
Dietrich Daroch
2c560f8c17 Fix: Use a simple prompt on dumb terminals. (#171)
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.
2019-03-26 07:51:09 -07:00
Justin Hileman
5e19f4f6c9 Fix function descriptions for a couple of helpers. 2019-03-18 07:43:38 -07:00
Justin Hileman
5273c92fa5 Use pwd -P for a normalized $PWD.
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 #191
Fixes #181
2019-03-18 07:43:13 -07:00
Justin Hileman
f49a8424cd Truncate the middle of really long git branch names
Fixes #161
2019-03-16 22:19:38 -07:00
Justin Hileman
da6379491f Add theme_display_git_stashed_verbose to docs. 2019-03-16 15:36:40 -07:00
Claudio Mezzasalma
0a6df2de5a Add Stashes count to Git Prompt (#188)
Introduce a new variable, `$theme_display_git_stashed_verbose`, which adds the stashes count to the prompt if set to `yes`
2019-03-16 15:33:12 -07:00
Justin Hileman
4ccdd7bdcf Support symlinks in project-relative paths in Fish 3.0
Fixes #181
2019-01-13 11:24:41 -08:00
Justin Hileman
ed0c2a4cc5 Use realpath for ignored VCS directories. 2019-01-13 10:46:50 -08:00
Justin Hileman
462878a929 Rename a bunch of variables called current_dir to what they actually are. 2019-01-13 10:02:32 -08:00
Justin Hileman
a2b56a33fb Reformat with fish_indent 2019-01-13 09:56:20 -08:00
Justin Hileman
fcec6aeece Omit functions and builtins when looking for ruby environment managers
This is especially important for asdf, because it turns out lots of people have aliases and functions called that :)

Fixes #160
2018-06-17 05:52:16 -07:00
Gregor Gebhardt
ed3ca3d618 added support for conda environments. (#150)
* added support for conda environments.
2018-06-02 01:27:26 -07:00
Justin Hileman
2642107093 Defer to prompt_hostname for hostname segment
As of fish 2.5.0, there's a canonical way to get the current hostname to put in the prompt. Let's use that.

Add a polyfill for fish < 2.5.0.

See #152
2018-05-05 05:13:59 -07:00
Justin Hileman
67bc90d291 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.
2018-05-04 05:46:20 -07:00
Justin Hileman
0cbeb3bc06 Make stderr redirection forward compatible 2018-05-03 15:41:35 -07:00
remche
d29026fab6 fixing desk prompt 2018-04-05 14:41:22 +02:00
Philip Schaten
f66bee227a Allow three values for theme_display_user. 2018-03-25 09:01:22 -07:00
Philip Schaten
89ca08abc4 theme_display_ssh defaults to no 2018-03-25 09:01:22 -07:00