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

Git Prompt Not Working - pure prompt - Centos 7.5 #127

Closed
SeanOBoyle opened this issue May 15, 2019 · 3 comments

Comments

@SeanOBoyle
Copy link

commented May 15, 2019

CentOS Version:

Distributor ID:	CentOS
Description:	CentOS Linux release 7.5.1804 (Core) 
Release:	7.5.1804

zsh Version:
zsh 5.0.2 (x86_64-redhat-linux-gnu)
Using prompt:
https://github.com/sindresorhus/pure
Loading as:
zplugin ice pick"async.zsh" src"pure.zsh"; zplugin light sindresorhus/pure
Git Prompt Not working - so I added this to pure.zsh:

+++ b/pure.zsh
@@ -388,6 +388,7 @@ prompt_pure_async_callback() {
        setopt localoptions noshwordsplit
        local job=$1 code=$2 output=$3 exec_time=$4 next_pending=$6
        local do_render=0
+        [[ -n $5 ]] && print "\nERROR($1): $5\n"
 
        case $job in
                \[async])

Got this error:
ERROR(prompt_pure_async_vcs_info): --zplg-reload-and-run:14: vcs_info: function definition file not found

Changing to 'is-at-least' 5.0.2 fixed it:

+++ b/zplugin.zsh
@@ -69,7 +69,7 @@ ZPLGM[RIGHTAR]=";:^[[C;:^[OC;:\\e[C;:\\eOC;:${termcap[kr]/$'\e'/^\[};:${terminfo
 ZPLGM[LEFTAR]=";:^[[D;:^[OD;:\\e[D;:\\eOD;:${termcap[kl]/$'\e'/^\[};:${terminfo[kcub1]/$'\e'/^\[};:"
 
 builtin autoload -Uz is-at-least
-is-at-least 5.1 && ZPLGM[NEW_AUTOLOAD]=1 || ZPLGM[NEW_AUTOLOAD]=0
+is-at-least 5.0.2 && ZPLGM[NEW_AUTOLOAD]=1 || ZPLGM[NEW_AUTOLOAD]=0
 #is-at-least 5.4 && ZPLGM[NEW_AUTOLOAD]=2
 
 # Parameters - shadowing {{{
@psprint

This comment has been minimized.

Copy link
Collaborator

commented May 18, 2019

The fix isn't doing the right thing: Zshells prior to 5.1 should use the previous autoload technique (the one that's utilizing -zplg-reload-and-run) because of problems with signals in those older Zshells. That said, I'm curious what's can be going wrong and I'll take a look at it

psprint added a commit that referenced this issue May 18, 2019
@psprint

This comment has been minimized.

Copy link
Collaborator

commented May 18, 2019

I've found and fixed the bug, it should now work fine. Thanks!

@SeanOBoyle

This comment has been minimized.

Copy link
Author

commented May 21, 2019

Confirmed fixed!
Thanks!

@SeanOBoyle SeanOBoyle closed this May 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.