parrot.live icon indicating copy to clipboard operation
parrot.live copied to clipboard

Color not reset after every frame

Open timmyRS opened this issue 6 years ago • 4 comments

The color should be reset after every frame so if you close the connection you can use your terminal normally without a different color.

timmyRS avatar Mar 24 '18 19:03 timmyRS

Spitting out a colors.reset('') after each frame should fix it.

Artoria2e5 avatar Mar 25 '18 16:03 Artoria2e5

I'm not sure how platform compatible colors.reset(null), but I'll try it out and push it up 🚀

Feel free to make a PR though 🙏

hugomd avatar Mar 26 '18 00:03 hugomd

colors.reset is part of the colors library that you are using colors for. In common ANSI speak it should be something like \u001b[0m.

Artoria2e5 avatar Mar 26 '18 17:03 Artoria2e5

I've had a play with this and it seems like it doesn't effect my zsh terminal (it's probably reloading the theme or something after the command finishes), but it does affect bash and presumably other terminals..

I had a look at resetting the colors after each frame, the only issue is that killing curl midway through means you can't pipe a final chunk 🤔

hugomd avatar Dec 02 '18 08:12 hugomd