this post was submitted on 28 Aug 2023
84 points (94.7% liked)

Rust

5651 readers
14 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

I didn't know I needed it, but what I know is that I will download it.

all 26 comments
sorted by: hot top controversial new old
[–] Selardor 25 points 1 year ago (1 children)

This was posted a few days ago. It's a great collection.

[–] [email protected] 12 points 1 year ago (1 children)

bat and rg I actually have already.... but now you make me waste so much time fiddling with all these ;)

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (1 children)

fd saves me so much time. I actually understand find better than I wish I did, and fd is just so, so much easier.

[–] [email protected] 1 points 11 months ago (1 children)

The advantage of both rg and fd are that they use the Perl-compatible regex syntax that almost every contemporary programming language uses. There's only one thing to learn.

[–] [email protected] 1 points 11 months ago

That, and the use of gitignore and other heuristics to ignore many files by default.

Plus, unlike grep, find is just...awkward. The directories to search must be prior to any search arguments (and . is not the default, it must be specified explicitly), and using a search pattern is treated as one of many special cases requiring one of a variety of flags rather than the obvious default operation.

It's a powerful DSL, but...not a convenient one by any stretch of the imagination.

[–] [email protected] 10 points 11 months ago

Don't forget about lsd

[–] [email protected] 10 points 1 year ago (1 children)

Hmm 🤔 something new for me. I’m in love with exa. What’s wrong with that?

[–] [email protected] 5 points 1 year ago (2 children)

me too, apparently they added some features and fixes. i wonder why they did it on a fork instead of pushing it upstream.

[–] [email protected] 3 points 1 year ago

I see. I suppose that exa is abandoned for two years or more and perhaps there’s no connection with maintainer. So then fork.

[–] [email protected] 8 points 1 year ago (3 children)
[–] [email protected] 18 points 1 year ago* (last edited 1 year ago) (1 children)

Absolutely nothing.... but for some reason I find it interesting when people rewrite things that I didn't know needed rewrites. Sometimes these projects are doing someting really interesting. Grep is one such example, noone was saying that grep needed a replacement. In fact, it was used as a benchmark for regex (which is how rg started, to compare rust regex against grep), then someone creates rg that outperforms grep and is much nicer to use. That is also why I keep an eye on GitOxide, since nobody ever accused git of being slow, yet there are someone rewriting git with amazing performance improvements.

[–] [email protected] 1 points 11 months ago (1 children)

From your experience have you felt these people had researched their reasonings for the rewrites extensively prior. Or did they discover these improvements along the way sort of, simply an off shoot of simply being a hobby when wanting to build their tooling to define existing flows/actions

[–] [email protected] 2 points 11 months ago

That varies quite a lot... but in general, the small tools seems to start as someone adding color and bling, possibly some nice things like automatic pager (like in bat). Still often nice additions though. For larger stuff like rg and gitoxide the authors seems to have done quite a lot of research and are really experts in their field. You don't improve grep and git by accident.

[–] [email protected] 9 points 1 year ago* (last edited 1 year ago) (1 children)

From eza's readme, on why it's better than ls:

It uses colours to distinguish file types and metadata. It knows about symlinks, extended attributes, and Git

[–] [email protected] 5 points 1 year ago* (last edited 1 year ago) (1 children)

GNU ls has those features too (except knowing about Git). I'd be surprised if BSD ls doesn't at least have color support.

...not that I'm not going to check out eza and probably switch to it! But it's often worth knowing what features the GNU/BSD coreutils do or do not support...especially when comparing other tools against them.

Edit: I just checked, and this set of options works on both BSD and GNU ls, in case anyone wants better ls behavior on a system where you can't install eza for some reason:

ls -FH --color=auto

F appends sigils indicating executables, symlinks, or directories, and H follows any symlinks in the argument list.

[–] RunAwayFrog 3 points 1 year ago

exa (which OP's readme says eza is built on) supports creation times. Actual creation time (the "Birth" line in stat output), not ctime.

[–] [email protected] 0 points 11 months ago

It's not cool. :)

[–] [email protected] 8 points 1 year ago

I've been using exa for a while and am a big fan. I'll have to give eza a go

[–] [email protected] 5 points 1 year ago

I use exa but I don't remember why

[–] [email protected] 2 points 11 months ago

Kind of nice actually. I have been using exa as a replacement for ls (also in Rust) but I like the tree like view here of files.

[–] [email protected] 1 points 11 months ago (1 children)

Anyone tried it and has an argument as to why people should use it over ls?

[–] [email protected] 4 points 11 months ago

'Should' is a pretty strong word, try it out if you want.

I mainly use it because it colorizes the output nicer than ls, but it also has git awareness if you need it.

[–] [email protected] 1 points 11 months ago* (last edited 11 months ago) (1 children)

I've used exa before and it's great software.What is the difference between exa and exz?