oh-my-fish / theme-bobthefish

A Powerline-style, Git-aware fish theme optimized for awesome.
MIT License
1.45k stars 225 forks source link

Git Prompt doesn't show after recent changes #196

Open dsager opened 5 years ago

dsager commented 5 years ago

After updating the theme my git prompt is gone. After testing different versions it seems to be caused by the commit 5273c92fa56cc20338ab4a834ef07427acee07b7

When installing the "new" version, the prompt is gone:

fisher add oh-my-fish/theme-bobthefish@5273c92fa56cc20338ab4a834ef07427acee07b7

image

After locking the theme to an older version (the previous commit), it shows again:

fisher add oh-my-fish/theme-bobthefish@f49a8424cd11f3e2f29807c099d61b7327a0c152

image

I tried to execute different functions to see if I can pin point this down further without success. So please let me know if there are any commands/functions/vars that could help debug this issue...

I'm running fish version 3.0.2 on Manjaro Linux.

dsager commented 5 years ago

For reference, this is the theme config from my config.fish:

set -g theme_display_git yes
set -g theme_display_git_dirty yes
set -g theme_display_git_untracked yes
set -g theme_display_git_ahead_verbose yes
set -g theme_display_git_dirty_verbose yes
set -g theme_display_git_master_branch yes
set -g theme_git_worktree_support yes
set -g theme_display_vagrant no
set -g theme_display_docker_machine no
set -g theme_display_k8s_context no
set -g theme_display_hg no
set -g theme_display_virtualenv no
set -g theme_display_ruby no
set -g theme_display_user ssh
set -g theme_display_hostname ssh
set -g theme_display_vi no
set -g theme_display_date no
set -g theme_display_cmd_duration yes
set -g theme_title_display_process no
set -g theme_title_display_path yes
set -g theme_title_display_user no
set -g theme_title_use_abbreviated_path yes
set -g theme_date_format "+%a %H:%M"
set -g theme_avoid_ambiguous_glyphs yes
set -g theme_powerline_fonts yes
set -g theme_nerd_fonts no
set -g theme_show_exit_status yes
set -g theme_color_scheme terminal-dark
set -g fish_prompt_pwd_dir_length 1
set -g theme_project_dir_length 0
set -g theme_newline_cursor no
shanesveller commented 5 years ago

I experience this as well, using Fish 3.0.1 installed via Homebrew, Oh My Fish v6, iTerm 2 v3.2.7 on OSX Mojave 10.14.3.

jschank commented 5 years ago

I also replicate this.

GermanFilipp commented 5 years ago

It seems that problem in this line

set -g theme_git_worktree_support yes
brand-it commented 5 years ago

I have the same problem, was working a bit of time ago but now I not getting much to work. Does anyone have any ideas on what I could take a look at?

set -g theme_display_git yes
set -g theme_display_git_dirty no
set -g theme_display_git_untracked no
set -g theme_display_git_ahead_verbose yes
set -g theme_display_git_dirty_verbose yes
set -g theme_display_git_stashed_verbose yes
set -g theme_display_git_master_branch yes
set -g theme_git_worktree_support yes
set -g theme_display_vagrant yes
set -g theme_display_docker_machine yes
set -g theme_display_hg yes
set -g theme_display_virtualenv no
set -g theme_display_ruby yes
set -g theme_display_user no
set -g theme_display_vi no
set -g theme_display_date no
set -g theme_title_display_process yes
set -g theme_title_display_path no
set -g theme_title_display_user no
set -g theme_title_use_abbreviated_path no
set -g theme_date_format "+%a %H:%M"
# set -g theme_avoid_ambiguous_glyphs yes

set -g theme_show_exit_status yes
set -g default_user your_normal_user
# set -g theme_color_scheme terminal-light-black
# set -g theme_color_scheme terminal2-light-black
set -g theme_color_scheme gruvbox
# set -g theme_color_scheme dark
# set -g theme_color_scheme terminal-dark-white
# set -g theme_color_scheme terminal2-dark-white
# set -g theme_color_scheme base16-dark
set -g fish_prompt_pwd_dir_length 0
set -g theme_project_dir_length 1
set -g theme_newline_cursor n
set -g fish_greeting
brand-it commented 5 years ago

Thanks @GermanFilipp I set it to no and it fixed my problem.

It seems that problem in this line

set -g theme_git_worktree_support yes

Sadly did not fix the problem with ruby version not showing up oh well :(

GermanFilipp commented 5 years ago

@brand-it hmm, what version of omf and theme-bobthefish do you use? Yesterday I updated to latest versions of fish-shell, omf and theme-bobthefish, and ruby settings works well

set -g theme_display_git yes
set -g theme_display_git_dirty yes
set -g theme_display_git_untracked yes
set -g theme_display_git_ahead_verbose yes
set -g theme_display_git_dirty_verbose yes
set -g theme_display_git_stashed_verbose yes
set -g theme_display_git_master_branch yes
set -g theme_git_worktree_support no
set -g theme_display_vagrant no
set -g theme_display_docker_machine no
set -g theme_display_k8s_context no
set -g theme_display_hg no
set -g theme_display_virtualenv no
set -g theme_display_ruby yes
set -g theme_display_user ssh
set -g theme_display_hostname ssh
set -g theme_display_vi no
set -g theme_display_date no
set -g theme_display_cmd_duration no
set -g theme_title_display_process no
set -g theme_title_display_path no
set -g theme_title_display_user no
set -g theme_title_use_abbreviated_path yes
set -g theme_date_format "+%a %H:%M"
set -g theme_avoid_ambiguous_glyphs yes
set -g theme_powerline_fonts no
set -g theme_nerd_fonts yes
set -g theme_show_exit_status no
set -g default_user germanfilipp
set -g theme_color_scheme base16
set -g fish_prompt_pwd_dir_length 0
set -g theme_project_dir_length 1
set -g theme_newline_cursor no
brand-it commented 5 years ago

fish, version 3.0.2 Oh My Fish version 6 * 3b2e847 - (HEAD -> master, origin/master, origin/HEAD) Fix status reporting (#197) (4 weeks ago) <Martin Kletzander>

This is a fresh install I started yesterday. I will see if updating helps me out. Also, reading through the code might be the answer as well.

brand-it commented 5 years ago

https://github.com/oh-my-fish/theme-bobthefish/blob/3b2e847fcc81655ede39c450a240c02528de66aa/fish_prompt.fish#L722

I confirmed that the fish_prompt is executing the code needed to get the ruby-version. That seems happy. Something else must be stopping it.

brand-it commented 5 years ago

ahh I think I figuring it out. If the global version matches the version it does not display. Which in this case the global version and the ruby version for the application are the same.

$ cat /Users/blareau/.rbenv/version
2.6.3
$ cat .ruby-version
2.6.3

This check seems to be my pain point. https://github.com/oh-my-fish/theme-bobthefish/blob/3b2e847fcc81655ede39c450a240c02528de66aa/fish_prompt.fish#L733

Don't know the solution but easy one for me would to just see if the .ruby-version the file is present.

SkylerLS commented 5 years ago

I'm also having the same issue. set -g theme_git_worktree_support yes is causing the entire box to disappear and setting it back to ... no will make the box re-appear but the name is shortened. This happened when I just re-installed bobthefish today after having it work successfully for over a year.