cs50 / help50-deprecated

This is help50, a command-line tool that helps students understand error messages.
https://cs50.harvard.edu/
GNU General Public License v3.0
62 stars 64 forks source link

when receiving input from pipe, output the input in addition to helping #250

Closed dmalan closed 7 years ago

dmalan commented 7 years ago

Incorrect in old version (and new):

screen shot 2017-06-24 at 2 49 01 pm

Piping, a la clang foo.c |& help50 should behave just like when running help50 clang foo.c.

cmlsharp commented 7 years ago

Fixed in the new version (will push a new commit with the other fixes soon). Worth noting though that we can't control the buffering from a process that is piped in.

cmlsharp commented 7 years ago

Additionally, there's no way to ensure colored output when input is piped in. Many programs (e.g. grep unless run with --color=always) will automatically disable colored output when they detect they're not writing to a TTY.

dmalan commented 7 years ago

np on piping, but help50 a.out should definitely preserve!

cmlsharp commented 7 years ago

Addressed in 2af4686