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
Great catch! I'm not really sure this is something that would be easy to fix, though.
bat uses clap for argument parsing and generating the --help message. By default, clap will only print the help message in color when printing to a terminal/tty. And in order to override clap's behaviour and force the help message to be colored, we would need to parse the --force-colorization argument using clap—which is a chicken and egg problem.
I suppose we could parse the arguments twice, but I don't feel like that's a good use of processing time for something that doesn't occur often and doesn't affect the user experience in a major way.
And in order to override clap's behaviour and force the help message to be colored, we would need to parse the --force-colorization argument using clap—which is a chicken and egg problem.
So it might not be too hard to fix. But I agree that it doesn't necessarily require fixing. --force-colorization is about bats standard output, not its --help text.
What steps will reproduce the bug?
bat --help --force-colorization | cat
What happens?
No content formatting
What did you expect to happen instead?
flags are bold like when unpiped
How did you install
bat
?Arch
bat version and environment
bat -V
bat 0.24.0 (fc95468)
The text was updated successfully, but these errors were encountered: