BLAHAJ
BLAHAJ copied to clipboard
Display the blahaj directly if stdin is not a pipe
If the stdin is not a pipe, we are not coloring the output of any commands, instead we are coloring our inputs in the terminal. This looks boring and is not expected.
We have several ways to detect if stdin is a pipe or a terminal. isatty(STDIN_FILENO) can detect terminal and S_ISFIFO(st.st_mode) can detect pipe. I don't know any clue about crystal though.
I can make it show a shark instead but not sure if matching cat should be considered. Currently, it matches cat's behavior