You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @deanc, due to the way CLImate was originally built I think it actually would be possible to use the same method names.
There is a lot of state involved within CLImate, so if you were doing lots of calls it would probably get expensive, and I'm concerned it could be confusing to newbies. But I'll give it some thought to see if this can be supported cleanly and easily
Hi @duncan3dc - thanks for the quick reply. That sounds great. I think when you deal with complex combinations then it makes sense to keep it as is, but perhaps for the most basic of use cases we could have some static methods. Perhaps something like:
::bold::italic::underline::red::backgroundRed and then ::colorAndBackground($foreground, $background, $string)
It's a little inconvenient having to instantiate an object to call methods for formatting each time, particularly for colours. The existing API is:
I propose adding some static utility methods to make usage easier and more concise, especially as there's not a great need for state.
Method name can adjusted, of course, but I guess it's important to maintain backwards compatibility so it can't just be
::red
I don't mind working on this if a PR would be accepted.
The text was updated successfully, but these errors were encountered: