Live data from Hacker News

Bat v0.26.0

github.com

71–78 of 78 posts

Re: Bat v0.26.0

#71

The `--pager=builtin` change is interesting; first time I've heard of minus. > Traditional pagers like more or less weren't made for integrating into other applications. They were meant to be standalone binaries that are executed directly by users. However most applications don't adhere to this and exploit these pagers' functionality by calling them as external programs and passing the data through the standard input…

Since when did Windows stop shipping a pager? IIRC it's been there since DOS 2.0 from 1983.

Re: Bat v0.26.0

#73
post #8

Earlier quoted context omitted.

A very wide used command line program that prints out the contents of a file on a terminal. Chances are pretty high cat is installed on your system already. Example: If you're navigating to the folder of a git repository in your terminal and quickly want to see what the readme says without having to open a file manager or going to the website on github/gitlab/codeberg you can run: cat README.md Which shows the text s…

It doesn't do that actually. It concatenates files. From the description on the man page: Concatenate FILE(s) to standard output. With no FILE, or when FILE is -, read standard input https://man7.org/linux/man-pages/man1/cat.1.html

Yeah sure, that is what happens when you feed your cat multiple files.

Cat in 99% of the usage cases is used on one file

Re: Bat v0.26.0

#74
post #72

The builtin pager doesn't have an END shortcut... it's useless without such a small thing. edit: [n] G Go to the very bottom of the output. If n is present, goes to that line Oh capital G. What an intuitive keyword source: https://docs.rs/minus/latest/minus/#standard-actions

It is the same shortcut as less, vim, etc. There is plenty of precedent to choose it.

Re: Bat v0.26.0

#75
post #48

Earlier quoted context omitted.

OMG the flashback... I remember using "The Bat!" and Rimart's "Becky! Internet Mail" Exclamation marks seemed to be popular in names back in the day :D

Becky was so good for participating in mailing lists. I could slip by as a Unix user even though I was still mostly using Windows as my client OS.

Ha!

I have a Becky backup on a Iomega Zip disk I have to check one day :D

Re: Bat v0.26.0

#76
post #73

Earlier quoted context omitted.

It doesn't do that actually. It concatenates files. From the description on the man page: Concatenate FILE(s) to standard output. With no FILE, or when FILE is -, read standard input https://man7.org/linux/man-pages/man1/cat.1.html

Yeah sure, that is what happens when you feed your cat multiple files. Cat in 99% of the usage cases is used on one file

No. What is stated by the manual is what cat does. What you said was simply incorrect.

It does have the effect of what you describe if one file is supplied and might be the most common use case. That doesn't make your description correct, at best it makes it incomplete.

Re: Bat v0.26.0

#77

bat is one of the few "new wave" tools that I install without hesitation, with no worries about stability issues or silent downsides. It has great defaults that make it feel like it always does the right thing for the context, just an unambiguous enhancement to my terminal experience.

> It has great defaults that make it feel like it always does the right thing for the context

Just tried it out yesterday and it by default output white text on my white background terminal. :(

Re: Bat v0.26.0

#78

Earlier quoted context omitted.

I probably have a bunch of such tools installed on my main machine. The problem is you actually need to remember to use them, and then maybe their command line switches to get the desired output. Whereas cat/less/git/vim are muscle memory. Not to mention that you first need to get over the hum of installing them in your system, likely needing to grab the latest Go/Rust/Zig toolchain along the way. So while I admire t…

Just alias them in your shell config. You don't have to remember to use them if you have more and less just be aliases to bat. Same thing I do with eza, the ls replacement -- "ls" calls eza.

I use fish’s abbreviations instead of aliases. That way I get control and visibility into the change, but can also gradually learn it too :)
Post reply on HN