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

Chain theme errors with Elvish 0.13 with default prompts #5

Closed
vendion opened this issue Jan 2, 2020 · 3 comments
Closed

Chain theme errors with Elvish 0.13 with default prompts #5

vendion opened this issue Jan 2, 2020 · 3 comments

Comments

@vendion
Copy link

vendion commented Jan 2, 2020

Using commit 5cd2d7c with Elvish v0.13 and the default prompts (both left and right). Example below where I originally launch the shell without the theme then call use to try to load it:

/usr/home/vendion> use github.com/zzamboni/elvish-themes/chain
/usr/home/vendion> read: Illegal option -d
prompt function error: sh exited with 2
(prompt here but not rendered)
read: Illegal option -d                                                                                                                                                                                                                        
prompt function error: sh exited with 2
(prompt here but not rendered)

I have even tried to manually define the segmants for the left and right prompts with the following and still get the same error:

chain:prompt-segments = [ su dir git-branch git-combined arrow ]
chain:rprompt-segments = [ (constantly (styled (whoami)✸(hostname) inverse)) timestamp ]

but I still get the same error as above.

@zzamboni
Copy link
Owner

zzamboni commented Jan 3, 2020

@vendion thanks for the report!

This error is produced by the href/elvish-gitstatus library (used by the git segments) and is caused by an incompatibility in the sh command, see href/elvish-gitstatus#3.

The best fix for this is to update to Elvish master and apply the patch from href/elvish-gitstatus#5 to use the new read-upto function instead of the external shell call.

Alternatively, you can leave things as they are and just replace sh with bash in https://github.com/href/elvish-gitstatus/blob/master/gitstatus.elv#L217

I'll close this issue since this is not an issue in the chain theme.

@zzamboni zzamboni closed this as completed Jan 3, 2020
@vendion
Copy link
Author

vendion commented Jan 6, 2020

Thanks for getting back to me so quickly, I just did the dirty fix for now as I was testing out Elvish 0.13 before updating the FreeBSD port for it.

I do really like your theme none the less, thank you for your great work ;)

@zzamboni
Copy link
Owner

zzamboni commented Jan 6, 2020

Happy you could fix it, and thanks for the kind words!

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

2 participants