sharkdp / bat

A cat(1) clone with wings.
Apache License 2.0
49.87k stars 1.26k forks source link

Colorized output for syslog files? #3111

Open thomas-j-adaptiva opened 1 month ago

thomas-j-adaptiva commented 1 month ago

Exactly as the title says. Tested on RHEL and Ubuntu, I don't see syslogs colorized.

image

keith-hall commented 1 month ago

perhaps we don't have a syntax mapping by default for /var/log/dmesg. Try bat -l syslog /var/log/dmesg and see how that looks :)

thomas-j-adaptiva commented 1 month ago

That works splendidly, thank you! Sorry about that!

Also a small bug, if you do a bat -l /var/log/dmesg with no option for the -l, it just hangs.

Thank you!

keith-hall commented 1 month ago

Also a small bug, if you do a bat -l /var/log/dmesg with no option for the -l, it just hangs.

that's not entirely a bug :) bat is designed to behave like cat whereby if you don't specify a filename, it reads from stdin. So it is waiting for stdin to end.