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

agnoster theme doesn't honor oh-my-zsh.hide-status #4561

Closed
MikaelSmith opened this Issue Oct 29, 2015 · 8 comments

Comments

Projects
None yet
7 participants
@MikaelSmith

MikaelSmith commented Oct 29, 2015

For repositories where querying git for the prompt is very slow, it'd be nice to be able to disable it. The agnoster theme doesn't currently support a method to do this, but the standard appears to be
git config --add oh-my-zsh.hide-status 1.

MikaelSmith added a commit to MikaelSmith/oh-my-zsh that referenced this issue Oct 29, 2015

@drasill

This comment has been minimized.

drasill commented Nov 20, 2015

I love agnoster, and as my $HOME is on a git repo, I really need this too :)

@jjdonov

This comment has been minimized.

jjdonov commented Jan 21, 2016

@MikaelSmith @drasill you can modify the them to honor the status, in agnoster.zsh-theme (or you custom copy) simply add an if statement:

## Main prompt
build_prompt() {
  RETVAL=$?
  prompt_status
  prompt_virtualenv
  prompt_context
  prompt_dir
  if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]];then
    prompt_git
    prompt_hg
  fi
    prompt_end
}
@MikaelSmith

This comment has been minimized.

MikaelSmith commented Jan 21, 2016

My PR did something similar, but applying it for hg as well makes sense.

MikaelSmith added a commit to MikaelSmith/oh-my-zsh that referenced this issue Jan 21, 2016

MikaelSmith added a commit to MikaelSmith/oh-my-zsh that referenced this issue Jan 21, 2016

@benatkin

This comment has been minimized.

benatkin commented Dec 3, 2016

hide-dirty speeds it up for me!

# current repo
git config --add oh-my-zsh.hide-dirty 1
# global (I use this on my VirtualBox guest where I have vagrant synced folders)
git config --global --add oh-my-zsh.hide-dirty 1
@MikaelSmith

This comment has been minimized.

MikaelSmith commented Dec 11, 2017

hide-dirty sounds like a useful approach. My PR is pretty stale, I'm tempted to close it. Is there still value to it?

@ExpandingMan

This comment has been minimized.

ExpandingMan commented Sep 11, 2018

Almost a year later and this still seems not to be working for me, any update on what's the best approach here?

I used to do this back about a year or so ago, and I had manually gone in and changed build_prompt in agnoster. I'd really like not to have to do that so I can just use the plain old master of oh-my-zsh and not have to do anything to update.

@SupermeReturns

This comment has been minimized.

SupermeReturns commented Sep 23, 2018

@ExpandingMan There is still no official solution to this problem, I adopted this PR make git config oh-my-zsh.hide-status work with the agnoster theme which worked for me.

@mcornella

This comment has been minimized.

Collaborator

mcornella commented Sep 24, 2018

Fixed in #6362.

@mcornella mcornella closed this Sep 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment