-
Notifications
You must be signed in to change notification settings - Fork 142
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
add forceColor command which allows forcing color on non-tty devices #21
Conversation
If user enters neither of |
Yes, it's |
The code looks good, I do have a few questions though -
enum class control {
autoColor = 108,
forceColor = 109
};
|
|
Okay let's change them to 0/1 instead and I'll merge it 😄 , though you can skip assigning them numbers all together. |
@@ -146,15 +159,33 @@ using enable = typename std::enable_if | |||
std::is_same<T, rang::bgB>::value, | |||
std::ostream& | |||
>::type; | |||
template <typename T> |
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.
an empty line before this to help readablity ;)
There's a subtle warning by clang builds too - https://travis-ci.org/agauniyal/rang/jobs/164220342#L346 |
I would like to thank you for taking out time to add this feature into rang library 😸 |
You're very welcome 😄. Thank you for the warm welcome to the open source community. |
Hey agauniyal,
I tried my best at implementing the forceColor ostream modifier. I'm a first timer in PR's and would really appreciate if you could take a look and give me some criticism 😄. I hope I didn't mess up too bad 😅.
Regarding the code, I don't really like to expose the
getIword
method, but I cannot think of any other way to give access to it.Hope this kind of helps and thanks in advance,
benni012