Show HN: Gat – cat alternative written in Go
github.com
github.com
It seems that this is probably slower and consumes far more resources than cat. It also does pretty printing and syntax highlighting. From a Unix standpoint, I would say this is not a cat replacement but a pretty replacement.
A cat alternative would have to handle this correctly:
$ </dev/zero cat >/dev/null
or it's not really a cat alternative. (Yes, variations on this theme are very useful in scripts and daily shell hacking).Besides, this way I can type 'man bat' and scowl.
But it's a very useful tool that I use often.
I'm not familiar with ccat but at a quick glance it does not appear to be a drop in cat replacement either.
I would be surprised to see it print to my terminal.
Edit: why downvotes? You can’t use words as commands that invoke a completely different set of connotations than the commands execution does
Anyways, in terms of usage I've heard, it is almost exclusively implying you'll brandish and/or apply your gun, maybe this part is more obscure, but if I wrote "stab myfile" I don't think you'd expect me to put the contents in a buffer.
I don't really find that command names reliably relate to words. Offhand none of these would do what I expect: curl, top, git, gawk. less is a more featureful more, and who knows what an xxd is. Certainly not a dead four eyed monster with its tongue hanging out.
stab is probably Send To A Buffer, just like grep is Global Regular Expression Print
"stab" would be obvious, but maybe someone needs to go out and ask 100 or a 1000 people on the street what they think of when they hear the word "gat", and maybe then you can congratulate yourself for being in an exclusive minority.
Anyway, to end the discussion, I guess the downvotes have other causes, and it'll remain a mystery to both of us.
Wish you had ended it a comment earlier.
Obviously converts spaces to tabs.
but this is fun, well done!