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

Prompt shows garbled #134

Open
moonwater opened this issue Nov 6, 2019 · 5 comments
Open

Prompt shows garbled #134

moonwater opened this issue Nov 6, 2019 · 5 comments

Comments

@moonwater
Copy link

when I enable this plugin, it shows garbled for the prompt:

[oh-my-zsh] Random theme '/home/master/.oh-my-zsh/themes/daveverwer.zsh-theme' loaded...
git_super_status:[:4: integer expression expected: have
git_super_status:[:7: integer expression expected: also
git_super_status:[:11: integer expression expected: python3
git_super_status:[:14: integer expression expected: installed,
git_super_status:[:17: integer expression expected: you
git_super_status:[:20: integer expression expected: can
git_super_status:[:23: integer expression expected: you

please help. thanks.

@thomasrebele
Copy link

There seems to be a problem with the python installation.
You could try the fork https://github.com/zsh-git-prompt/zsh-git-prompt.

Check out the fork and run zsh zshrc.sh --debug. It should show the complete error message.

@rherrick
Copy link

I found this issue because I'm running into the exact same problem. @thomasrebele I tried your suggestion and get the following:

root@xnatpi [15:59:17] [~] -> # git clone https://github.com/zsh-git-prompt/zsh-git-prompt [You|] Cloning into 'zsh-git-prompt'... remote: Enumerating objects: 856, done. remote: Total 856 (delta 0), reused 0 (delta 0), pack-reused 856 Receiving objects: 100% (856/856), 1.11 MiB | 5.34 MiB/s, done. Resolving deltas: 100% (488/488), done. git_super_status:[:4: integer expression expected: have git_super_status:[:7: integer expression expected: also git_super_status:[:11: integer expression expected: python3 git_super_status:[:14: integer expression expected: installed, git_super_status:[:17: integer expression expected: you git_super_status:[:20: integer expression expected: can git_super_status:[:23: integer expression expected: you root@xnatpi [15:59:20] [~] -> # cd zsh-git-prompt [You|] git_super_status etc root@xnatpi [15:59:24] [~/zsh-git-prompt] [master] -> # zsh zshrc.sh --debug [You|] git_super_status etc

For readability, I left the git_super_status in the first occurrence but replaced it with git_super_status etc for subsequent ones, but it is occurring every time I run any command.

And just for informational purposes... I had both of these lines in my .zshrc:

antigen bundle git-prompt antigen bundle zsh-users/zsh-git-prompt

I commented out the second line but the error kept occurring. I commented out the first line and it stopped. So it looks like the issue is with git-prompt, but it gets weird because I don't see zsh-git-prompt anywhere in my user's home folder. I even deleted the .antigen folder and .zshrc.zwc and started a new shell, but don't see where it ends up:

root@xnatpi [16:10:01] [~] -> # find . -name "*git*prompt*" ./.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git-prompt ./.antigen/bundles/robbyrussell/oh-my-zsh/plugins/git-prompt/git-prompt.plugin.zsh ./.antigen/bundles/robbyrussell/oh-my-zsh/plugins/gitfast/git-prompt.sh

Note that this is happening with root in the bit that I pasted here, but that's because I just happened to be installing stuff (including zsh and related tools). It happens with any user though, not just limited to root. This is on Ubuntu 19.10 running on a Raspberry Pi 4. Let me know if there's any other info I can get to help find the cause.

@thomasrebele
Copy link

thomasrebele commented Jan 22, 2020

The error integer expression expected: have git_super_status indicates that you might have activated both, the old zsh-git-prompt and the one from @zsh-git-prompt. I just saw that the git-prompt plugin of oh-my-zsh also uses the git_super_status command.
Could you try to deactivate the git-prompt plugin?
If this doesn't work, could you share your .zshrc?

I don't have experience with antigen, but it would be nice to add support for it.
According to the antigen documentation we would need to add a .plugin.zsh file in the zsh-git-prompt repo.

PS: I recommend to use code blocks (separate with an empty line and indent with four spaces):

antigen bundle git-prompt
antigen bundle zsh-users/zsh-git-prompt

@moonwater
Copy link
Author

thanks @thomasrebele, the garbled disappeared after some update in 19.10.
now it happened again in ubuntu 20.04.

@thomasrebele
Copy link

Could you post the output of python gitstatus.py, or python3 gitstatus.py?

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

3 participants