Live data from Hacker News

Bat v0.26.0

github.com

51–60 of 78 posts

Re: Bat v0.26.0

#51

Earlier quoted context omitted.

Along with bat, these are my main ones that I install always: fd, a better find: https://github.com/sharkdp/fd ripgrep (rg) a modern grep: https://github.com/BurntSushi/ripgrep eza for ls replacement: https://github.com/eza-community/eza duf is a cleaner df: https://github.com/muesli/duf dust for du: https://github.com/bootandy/dust Also fish + starship + yazi + helix, all of which mostly work perfectly with the defa…

What is helix? Haven't heard of it before, I don't think.

I tried getting into nvim (handy for editing from the CLI or over ssh), but within weeks the plugin system started getting weird errors.

Then I tested Helix[0] when a friend suggested it and it Just Works. Along with LSP support that just picks up language servers automatically if you install them.

The target-action command style takes some getting used to after (n)vim's action-target style, but I actually prefer it now.

[0] https://helix-editor.com

Re: Bat v0.26.0

#52

Earlier quoted context omitted.

> Do people widely agree with this? That sounds less like 'exploitation' to me and more like 'the way Unix works'. I personally don't. UNIX is made to be composable, and it's composition. more, less, most all consider pipe input as first-class citizens. I'm personally fond of "grep --color=always file.ext | less --raw" to page colored output. > Is that really the best approach? I don't think so. If I was the develope…

Bloat cannot mean large contributor to the code size, since it's a tiny portion of the binary and dwarfed by the regex, syntax highlighter, and (sigh) command-line parsing. It also cannot mean unwanted feature, since every single time I have ever used it to look at a file I have wanted it paged, and I can't think of a circumstance where I wouldn't want it paged (given that my terminal is already set up to work with p…

Bloat is generally code complexity, which slows down maintenance and development.

In this case, there's a new pager library, conditional connections to the pager library, and possibly the whole shebang of supporting both internal and external pagers at the same time.

I seldom use bat, and I'm not hating it. Syntax highlighting and line numbering looks nice for the use cases I played with it, but I don't find chaining a couple of pipes together to get something exactly I want, a waste of time, esp. when mangling outputs of commands and taking actions according to these outputs.

Development and system administration calls for different conventions on the terminal, and I understand & respect how developers like to "enhance" their terminals to work faster. OTOH, after having both hats for a very long time, I find most (if not all) of these "enhancements" unnecessary because it's either distracting or getting in the way.

For the most tiring and most-used expressions, I use espanso to expand them on the terminal instantly, and I found that doing this gives me more flexibility without it being on my face.

Maybe this is because I can think further steps while typing something in, and I don't waste that time in a sense many people sees. Maybe we shouldn't strive to extract efficiency over every nanosecond of work, and maybe there's something happening we don't quite grasp in these moments we label as "waste".

IDK.;)

Re: Bat v0.26.0

#53

Earlier quoted context omitted.

What is helix? Haven't heard of it before, I don't think.

I tried getting into nvim (handy for editing from the CLI or over ssh), but within weeks the plugin system started getting weird errors. Then I tested Helix[0] when a friend suggested it and it Just Works. Along with LSP support that just picks up language servers automatically if you install them. The target-action command style takes some getting used to after (n)vim's action-target style, but I actually prefer it…

fwiw, the plugin system doesn't magically just get "weird errors", its always some form of user negligence.

Re: Bat v0.26.0

#54

Earlier quoted context omitted.

any other recommendation?

Along with bat, these are my main ones that I install always: fd, a better find: https://github.com/sharkdp/fd ripgrep (rg) a modern grep: https://github.com/BurntSushi/ripgrep eza for ls replacement: https://github.com/eza-community/eza duf is a cleaner df: https://github.com/muesli/duf dust for du: https://github.com/bootandy/dust Also fish + starship + yazi + helix, all of which mostly work perfectly with the defa…

Zsh > fish for me. It's about script compatibility.

Re: Bat v0.26.0

#55

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…

If you think of bat as in the same category of functionality as a pager, I think it works.

Unlike cat, bat already seems deeply interested in the presentation of text on a terminal. Pagination involves several aspects of presentation of text on terminals. So, it's still arguably one thing from a conceptual perspective.

Not knowing much about bat (so I don't know how much this has already been thought of), I could even see bat and pager integrating in a way that you couldn't easily as separate programs. Supporting a feature where the opening lines of a paragraph, or a new section, are deferred to the next page, for example.

Re: Bat v0.26.0

#56

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.

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…

I’m in the same boat with a lot of these tools, but bat is different in that it’s compatible enough to be safe to alias to the command it's replacing[1]. You can continue to use cat as usual, with the benefit of getting syntax-highlighted output.

[1]: Assuming you use the `--paging=never` flag in your alias as the README suggests.

Re: Bat v0.26.0

#57
post #19
post #12

Earlier quoted context omitted.

Just a nitpick. The real use of cat is to concatenate two or more files and dump the result in its stdout. But people use it more like file viewer these days. Bat is a file viewer in every sense. I have concatenated multiple files using bat. It does come in handy sometimes. But even the concatenated output is designed to be a visual aid, not the traditional concatenation that cat does.

To be 100% fair, Bat only acts this way when used in an interactive environment. As far as I know, in non-interactive cases (a la shell scripting) it falls back to normal cat behaviour

That's interesting! How did you know?

Re: Bat v0.26.0

#59
post #54

Earlier quoted context omitted.

Along with bat, these are my main ones that I install always: fd, a better find: https://github.com/sharkdp/fd ripgrep (rg) a modern grep: https://github.com/BurntSushi/ripgrep eza for ls replacement: https://github.com/eza-community/eza duf is a cleaner df: https://github.com/muesli/duf dust for du: https://github.com/bootandy/dust Also fish + starship + yazi + helix, all of which mostly work perfectly with the defa…

Zsh > fish for me. It's about script compatibility.

All my scripts start with #!/bin/bash

Zero issues with compatibility

Re: Bat v0.26.0

#60

Earlier quoted context omitted.

I tried getting into nvim (handy for editing from the CLI or over ssh), but within weeks the plugin system started getting weird errors. Then I tested Helix[0] when a friend suggested it and it Just Works. Along with LSP support that just picks up language servers automatically if you install them. The target-action command style takes some getting used to after (n)vim's action-target style, but I actually prefer it…

fwiw, the plugin system doesn't magically just get "weird errors", its always some form of user negligence.

I literally didn’t touch it and it started throwing errors :)
Post reply on HN