Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display the blahaj directly if stdin is not a pipe #12

Open
Aleksanaa opened this issue Oct 15, 2023 · 1 comment
Open

Display the blahaj directly if stdin is not a pipe #12

Aleksanaa opened this issue Oct 15, 2023 · 1 comment

Comments

@Aleksanaa
Copy link

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.

@GeopJr
Copy link
Owner

GeopJr commented Oct 17, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants