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

Inconsistency in bold text #20

Closed
ejuarezg opened this issue Dec 29, 2021 · 10 comments
Closed

Inconsistency in bold text #20

ejuarezg opened this issue Dec 29, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@ejuarezg
Copy link

ejuarezg commented Dec 29, 2021

Hi,

I was trying out your zsh theme and I noticed some inconsistency in the bold text. Some of my commands had bold text and some did not. It's difficult to reproduce the bug but it's definitely there after you've used the theme for some time.

I believe I managed to track the source of the issue to the lack of %b in https://github.com/zthxxx/jovial/blob/master/jovial.zsh-theme#L139 Making this change helped solved the inconsistency in the bold text. I suspect that exit-code.suffix may also require this change.

@zthxxx
Copy link
Owner

zthxxx commented Dec 29, 2021

Could you post some screenshots?

@zthxxx
Copy link
Owner

zthxxx commented Dec 29, 2021

@ejuarezg I think I haven't forget to reset some style, and it's not needs %b because I have really reset all style prefixed each prompt parts, also it's prefix to the user input area;

image

image

@zthxxx
Copy link
Owner

zthxxx commented Dec 29, 2021

@ejuarezg Maybe you are manually install and used it without oh-my-zsh (like the steps in docs),

actually it's a bug that sgr_reset will invalid due to not load zsh/colors module (zmodload zsh/colors),

and I fixed it in v2.2.1, would you upgrade the theme?

@zthxxx zthxxx added the bug Something isn't working label Dec 29, 2021
@ejuarezg
Copy link
Author

ejuarezg commented Dec 29, 2021

Yes, I did install this manually. However, I'm still able to reproduce it in the new version. See the inconsistency in the lines where I use rm and echo in the attached screenshot.
image

This is the zsh config I'm using to load and configure jovial:

setopt prompt_subst
source "$ZSH_PLUGINS_PATH/jovial/jovial.zsh-theme"
source "$ZSH_PLUGINS_PATH/jovial/jovial.plugin.zsh"
JOVIAL_SYMBOL[arrow.git-clean]='(^‿‿^)'
JOVIAL_SYMBOL[arrow.git-dirty]='(-__-)'

ZSH_PLUGINS_PATH is just a path variable pointing to my plugins location.

@zthxxx
Copy link
Owner

zthxxx commented Dec 29, 2021

@ejuarezg Could you run this print commands below and take a screenshot to reply?

print -P "%B xxxx  xxxx"
print -P "%B xxxx %b xxxx"
print -P "%B xxxx ${sgr_reset} xxxx"

Additionally, note that the syntax highlight of user input area is not provide by jovial, including bold like rm README.md in your screenshot shown;
It provides by zsh-syntax-highlighting plugin most of the time, so you can disable it and try to reproduce again.

@zthxxx
Copy link
Owner

zthxxx commented Dec 29, 2021

@ejuarezg Is that still able to reproduce the inconsistency bold when you disable other plugins?

@ejuarezg
Copy link
Author

ejuarezg commented Dec 29, 2021

Ok, I went ahead and nuked my entire zsh config and just loaded the jovial theme. Here's what it looks like after running the commands:
image

I guess this rules out your zsh theme causing the inconsistency. It may be due to zsh-syntax-highlighting or zsh-history-substring-search plugin that I use.

It is weird though that adding %b to path.suffix seems to fix the problem.

Edit: I deleted a previous post due to error where I used my jovial fork instead of your repo.

@zthxxx
Copy link
Owner

zthxxx commented Dec 29, 2021

@ejuarezg Fine, thanks for use and feedback 😄 and path.suffix in JOVIAL_AFFIXES is also design for customization, so you may not need fork this repo or change source file, just set config to override in your .zshrc will be okay;

# ~/.zshrc

JOVIAL_AFFIXES[path.suffix]="%b"

see more in https://github.com/zthxxx/jovial#affixes

@zthxxx
Copy link
Owner

zthxxx commented Dec 29, 2021

BTW, I have also used zsh-syntax-highlighting and zsh-autosuggestions, but cannot reproduce the bug after v2.2.1.

@ejuarezg
Copy link
Author

Interesting.. If I ever find the culprit of this bug, I'll let you know. For all I know, the cause could be some other zsh setting/option that I use in my main config. Thanks for your help!

Cheers

@zthxxx zthxxx closed this as completed Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants