Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Prompt doesn't show after recent changes #196

Open
dsager opened this issue Mar 19, 2019 · 11 comments
Open

Git Prompt doesn't show after recent changes #196

dsager opened this issue Mar 19, 2019 · 11 comments

Comments

@dsager
Copy link

dsager commented Mar 19, 2019

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

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
Copy link
Author

dsager commented Mar 19, 2019

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
Copy link

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
Copy link
Contributor

jschank commented Apr 22, 2019

I also replicate this.

@GermanFilipp
Copy link

It seems that problem in this line

set -g theme_git_worktree_support yes

@brand-it
Copy link

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
Copy link

brand-it commented Apr 25, 2019

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
Copy link

@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
Copy link

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
Copy link

set ruby_version (rbenv version-name)

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
Copy link

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.

[ "$ruby_version" = "$global_ruby_version" ]

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

dsager added a commit to dsager/dotfiles that referenced this issue May 16, 2019
this caused the git prompt to disappear in the latest version of the
theme bobthefish.

ref: oh-my-fish/theme-bobthefish#196
Dietr1ch pushed a commit to Dietr1ch/config-fish that referenced this issue Jul 20, 2019
@SkylerLS
Copy link

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.

dsager added a commit to dsager/dotfiles that referenced this issue Sep 23, 2019
this caused the git prompt to disappear in the latest version of the
theme bobthefish.

ref: oh-my-fish/theme-bobthefish#196
SkylerLS referenced this issue Oct 11, 2019
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` :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants