
Bat: A cat(1) clone with wings - swalsh
https://github.com/sharkdp/bat
======
Sir_Cmpwn
No no no, just open your text editor. vipe[1] will soak up a pipe, open your
editor, and write the final file to stdout. Something like bat is the opposite
of Unix.

[1] [https://joeyh.name/code/moreutils/](https://joeyh.name/code/moreutils/)

If this was just "pipe text into me and I'll print it out with syntax
highlighted ANSI codes" then I'd be all for it. As a cat replacement this is
nonsense.

~~~
splatzone
I could see this being really handy for viewing source files on remote servers
(I prefer to use Sublime normally)

What do you mean when you say this the opposite of unix, and why is it a bad
thing?

~~~
spiffistan
See:
[https://en.wikipedia.org/wiki/Unix_philosophy](https://en.wikipedia.org/wiki/Unix_philosophy)

~~~
splatzone
Thanks, I am aware of the unix philosophy but I’m not sure how bat contravenes
it; it seems like you can use it non-interactively and use its output with
other programs, and it performs one task (outputting files with syntax
highlighting).

Am I missing something?

~~~
Sir_Cmpwn
It does the following things:

\- concatenate files \- syntax highlighting \- line numbering \- git status \-
pager

~~~
splatzone
Thanks, I understand your point now. I wasn’t thinking about it in a granular
way

------
dagenix
Its great to see modern takes on classic UNIX tools, such as this, ripgrep,
and others. I'm very curious to see if anyone ever gets around to writing a
new twist of `dd`.

------
aequitas
> bat can pipe its own output to less if the output is too large for one
> screen.

Please don't do this by default. Systemd commands have this habit as well. I
understand it is for usability. But it makes viewing output unpredictable as
now I might end up in the pager (or not, you can't tell beforehand unless you
know the content, which you are going to look at) that I have to exit before
typing the next command.

------
empath75
I like bat because it works fine for what cat is supposed to be used for but
it’s better than cat for what most people use it for.

~~~
bb88
I tend to use vi or less for that, because of the handy searching/scrolling
commands. Having used cat for 30 years, I only use cat for scripting
typically.

If bat was described as an advanced syntax diff tool, I'd probably be more
interested in it. But "cat with wings" seems pointless, because cat does
everything I need it to.

------
sevensor
I was hoping this was written in Python as a reference to the travel agent
sketch. "A cat?" "No, a bat."

