diff options
author | Robby Russell <robby@planetargon.com> | 2014-06-30 21:00:53 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-06-30 21:00:53 -0700 |
commit | 4131a59d1a57d53bf711115317116a6c57483636 (patch) | |
tree | c3b2a746fdc18708b4c18b33c4475f20bf9d4e61 /lib/git.zsh | |
parent | 3913106b2e7127d396f27b652df812340ec0c871 (diff) | |
parent | 08632bb1780d51f6748b5c09ef5232862313f78f (diff) | |
download | zsh-4131a59d1a57d53bf711115317116a6c57483636.tar.gz zsh-4131a59d1a57d53bf711115317116a6c57483636.tar.bz2 zsh-4131a59d1a57d53bf711115317116a6c57483636.zip |
Merge pull request #2827 from ncanceill/easymerge
...you folks are amazing. :-)
"Easy-to-merge"
Diffstat (limited to 'lib/git.zsh')
-rw-r--r-- | lib/git.zsh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/git.zsh b/lib/git.zsh index 305a77aff..b0e73bf3a 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -1,8 +1,8 @@ # get the name of the branch we are on function git_prompt_info() { - if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then + if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ - ref=$(command git rev-parse --short HEAD 2> /dev/null) || return + ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" fi } |