zsh-git-prompt icon indicating copy to clipboard operation
zsh-git-prompt copied to clipboard

empty repos have invalid integer expressions

Open whwright opened this issue 6 years ago • 0 comments

I just updated to latest in my zsh config and am getting the following error:

user@computer  ~  
↪ cd empty-repo 
git_super_status:[:23: integer expression expected: yet                                                              
git_super_status:[:23: integer expression expected: commits
git_super_status:[:26: integer expression expected: yet
git_super_status:[:29: integer expression expected: commits
git_super_status:[:35: integer expression expected: on
git_super_status:[:39: integer expression expected: master
user@computer  ~/empty-repo  (No|✔)

It appears that for an empty repo, the value of __CURRENT_GIT_STATUS right here is "No commits yet on master 0 0 0 0 0 0 0 0 origin/master 0 0" which goes on to assume "commits" "yet" "on" and "master" are the numbers for ahead, behind, staged, conflicts.

whwright avatar Sep 14 '18 02:09 whwright