Add text helpers for background colors#1624
Merged
0x1eef merged 4 commits intopry:masterfrom Aug 20, 2017
Merged
Conversation
Contributor
|
Very cool! |
Contributor
|
Travis failure is the known ruby2.4 segfault. |
0x1eef
pushed a commit
that referenced
this pull request
Aug 21, 2017
0x1eef
pushed a commit
that referenced
this pull request
Aug 23, 2017
This was referenced Oct 22, 2017
Contributor
Author
|
Thanks for taking this the rest of the way! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pry::Helpers::Textdefines useful methods for coloring text, but it does not offer similarly for coloring the background. This PR adds that ability through methods such asblack_on_greenandbright_cyan_on_yellow.I originally tried to implement it in an additive way (similar to how you can combine the
boldhelper withredto get text that is both bold and red), but unfortunately foreground and background colors must be defined together.I used this approach to create a Powerline-like Pry prompt.