-
Notifications
You must be signed in to change notification settings - Fork 156
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
Suggestion: Automatic pretty printing if stdout is a tty #169
Comments
I dunno. From my POV, It's also mildly annoying to do the following dance: $ jo <something_that_generates_copious_output>
# ARGH! A thousand lines of pretty-printed text!
$ jo <something_that_generates_copious_output> | less
# ARGH! Everything's squished together!
$ jo -p <something_that_generates_copious_output> | less So yeah, I'd much rather have |
I agree with @gromgit. At best we could introduce an environment variable ( |
I think we can add |
|
Hello, interesting project, thank you.
Would it make sense to check whether
stdout
is connected to a terminal via isatty(3) and then automatically enable pretty printing? I could imagine that, when you are typing on the terminal, you would want to see an easier to read json output, but when you are piping to other programs the size should be small.You can test how the output behaves when it is not a tty by piping into
cat
like so:The text was updated successfully, but these errors were encountered: