BLAHAJ icon indicating copy to clipboard operation
BLAHAJ copied to clipboard

Display the blahaj directly if stdin is not a pipe

Open Aleksanaa opened this issue 2 years ago • 1 comments

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.

Aleksanaa avatar Oct 15 '23 16:10 Aleksanaa

I can make it show a shark instead but not sure if matching cat should be considered. Currently, it matches cat's behavior

GeopJr avatar Oct 17 '23 18:10 GeopJr