You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I was excited by the new jet features that revealed it was possible from Graalvm to detect if stdout is a terminal. I immediately thought this same feature would allow babashka scripts that emit colored output to remove the colors if their output was not directly to the terminal.
Describe the solution you'd like
Perhaps a function called isatty that you can call like this:
Is your feature request related to a problem? Please describe.
I was excited by the new jet features that revealed it was possible from Graalvm to detect if stdout is a terminal. I immediately thought this same feature would allow babashka scripts that emit colored output to remove the colors if their output was not directly to the terminal.
Describe the solution you'd like
Perhaps a function called
isatty
that you can call like this:I don't know which namespace this function should belong to. Perhaps
babashka.process
.Describe alternatives you've considered
I was able to achieve a similar detection by shelling out to bash:
The text was updated successfully, but these errors were encountered: