tatsuhiro-t / spdylay

The experimental SPDY protocol version 2, 3 and 3.1 implementation in C
http://tatsuhiro-t.github.io/spdylay/
MIT License
603 stars 102 forks source link

[feature request] Flag for coloured output when piped #87

Closed chmac closed 10 years ago

chmac commented 10 years ago

Firstly, thanks a lot for spdycat, it's a huge help to be able to easily automate SPDY requests from a shell. We're using it to artificially warm our Varnish caches with SPDY optimised page versions. Would have been a real nightmare to automate a SPDY capable browser, so you've saved us a huge amount of work. Thank you kindly.

If I may offer one small, low priority feature request, it would be great to have a flag that enables coloured output even when the output is piped. I'm a big fan of byobu (a wrapper for screen / tmux) which means I try to use less instead of scroll back. With tools like puppet which always output colours, I use less -R with great affection. I'd be wonderful to be able to do something like src/spdycat --color -v https://www.google.com/ | less -R and see coloured output... :-)

tatsuhiro-t commented 10 years ago

Warming up caches using spdycat is interesting usecase. I understand that your request is force ascii color code even if the output is not tty.

tatsuhiro-t commented 10 years ago

Fix committed in 91707c7