-
Notifications
You must be signed in to change notification settings - Fork 384
Color output #663
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
base: main
Are you sure you want to change the base?
Color output #663
Conversation
A "sticky" color is a color which remains the same for the same "key". It is intended to be used to colorise host-names
|
Note that this also tries to reproduce the behaviour from fabric 1 (same function names, and same args as the One could argue to add a code into ... although that looks a bit hacky, but would reproduce fabric-1 behaviour completely. Thoughts? |
|
Sorry for the commit-spam... I am having issues with my dev environment and rely on travis. |
|
There seems to be something strange going on with For the time being I will split the test |
|
Okay... should be good now... all checks are passing at least. I cleaned up the intermediary commits. Most of which are caused because I was unable to run the tests locally so I was dependent on pushing to make it run in Travis. |
|
oh no... 😆 |
2ca8c00 to
f06c707
Compare
|
Done. |
|
When can we merge this in? |
|
@bitprophet Hello again! Are there still plans to support colored output? |
|
Thanks for this! Haven't dig into it yet but to answer the question about vendoring, it means adding something to the vendor folder like the rest of the stuff in there. There's actually an invoke task somewhere for pulling a pip installable library into that tree, tho I haven't used it in ages. When I have time to review I'll make the judgement call re: whether it is worth replacing custom color codes with a lib or not. |
|
Sure. No worries. Take your time. I'm not in a hurry. If you need any feedback, don't hesitate to give me a nudge. I also see that there are conflicts on the branch. If I don't forget about this I'll try to remove those to make merging this a bit less painful 😉 |
|
Since the inception of this PR there is another library that is heavily supporting colorising terminal text across the multitudes of terminals: Even This might be a good feature to target in the v2.0 of invoke once Python2 support is dropped and all the work on CircleCI is tidied up as well as some outstanding bugs for python 3.10 The colorised output could be a good visual indicator of the major change to invoke that it aesthetically got a coat of paint. |
This PR adds a very simple implementation for ANSI color output.
I am aware about #101 and that there are plans to "vendorise" something like
colorama. This PR serves mainly to get the ball rolling and to scratch my own itch.I am willing to incorporate
coloramainstead of using hand-crafted code.However, I am unaware what is meant by "vendorising" code. Does that mean adding it as a simple dependency? Or rather copying the code into
invoke. In the latter case, should I simply copy the code intoinvoke/vendor?Let me know what option you'd prefer and I'll get to it.