Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fish shell: how to disable "git status" in prompt?

Tags:

fish

I love Fish shows me "git status" in the prompt. However, it doesn't work well for really large git repos because it's very slow. How can I disable this feature based on the directory's name? Thanks!

like image 695
jduan Avatar asked Jan 27 '26 10:01

jduan


1 Answers

Here's what I did. You need to replace those <REPO>

function fish_prompt
  set last_status $status

  set_color $fish_color_cwd
  printf '%s ' (prompt_pwd)
  set_color normal

  set BIG_REPOS <REPO1> <REPO2> <REPO3>
  if not contains (basename $PWD) $BIG_REPOS
    printf '%s ' (__fish_git_prompt)
  end

  set_color normal
end
like image 138
jduan Avatar answered Jan 29 '26 11:01

jduan



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!