-
Notifications
You must be signed in to change notification settings - Fork 937
[Bugfix] Resolve #918 Transparent background #925
[Bugfix] Resolve #918 Transparent background #925
Conversation
Now function getColorCode consider value 'none' like a good value. When it's use to set background the segment become transparent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @JulienPivard !
Good catch there. Thanks for submitting a PR.
functions/colors.zsh
Outdated
@@ -79,6 +79,10 @@ function getColorCode() { | |||
else | |||
echo -n "$1" | |||
fi | |||
# Check if value is none with any case. | |||
elif [[ $1 = [nN][oO][nN][eE] ]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be more readable to write that as elif [[ "${(L)1}" == "none" ]]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I add to the next commit
@julienfalque - Thanks so much for putting together this PR! We'll be able to get this in our next release, v0.6.6, which, I'm really happy about. @onaforeignshore - Do you mean outside of the if / elif / else structure? I'm a fan of keeping that conditional flow to prevent unneeded evaluations, although the lines couldn't be concatenated to:
|
You're welcome |
@bhilburn Just FYI.
|
it's already changed in 5ce384f |
@dritter If I change the line if [[ "$1" == "NONE" || "$2" == "NONE" ]]; then to if [[ "${(L)1}" == "NONE" || "${(L)2}" == "NONE" ]]; then And if I remove the test I have the same result. For a better rendering I think we should keep that test, |
@JulienPivard The (L) in |
@onaforeignshore thanks if [[ "${(U)1}" == "NONE" || "${(U)2}" == "NONE" ]]; then |
I fixed a problem in combination with newlines in #960 . Could you try out that PR, and and see if the problem exists there? |
@dritter It's work. |
Merged into master as part of #944, and will be part of the v0.6.6 release! |
Before function getColorCode consider value 'none' like a bad value and search for another value that could match.
Now function getColorCode consider value 'none' like a good value and no longer seeks to replace it.
When it's use to set background the segment become transparent.