Show HN: Lstr – A modern, interactive tree command written in Rust

w108bmg | 178 points

Seems quite cool! Though the demo gif with (what seem to be?) broken icons is a bold choice :p

ipdashc | 13 hours ago

crazy good, so it'll ignore showing files enlisted in gitignore while listing?

b0a04gl | an hour ago

First off, the display looks great!

Second off, I didn't realize how deep the dep tree would be for this type of program -- 141 total! So much of it is the url crate, itself a dep of the git crate, but there's a bunch of others too. I'm just getting into learning Rust -- is this typical of Rust projects or perhaps typical of TUI projects in general?

(EDIT to strikeout) ~~The binary is also 53M as a result whereas /usr/sbin/tree is 80K on my machine -- not really a problem on today's storage, but very roughly 500-1000x different in size isn't nothing.~~

Maybe it's linking-related? I don't know how to check really.

(EDIT: many have pointed out that you can run `cargo build --release` with other options to get a much smaller binary. Thanks for teaching me!)

drabbiticus | 13 hours ago

No async which is nice. TIL that Rayon has an almost Occam like syntax: https://github.com/bgreenwell/lstr/blob/44b9bbf118ca90558138... although you subsequently went with a library that bundles parallel filesystem traversal.

dboreham | an hour ago

Really appreciate all the comments and useful feedback (first Rust package). Especially ways to reduce the size of the binary!

w108bmg | 13 hours ago

So after writing this to learn Rust, what are your thoughts on Rust? What do you especially like and dislike about it, or what were you surprised about?

sdegutis | 13 hours ago

This looks awesome! Right up my alley.

Side-note: what theme are you using in the linked gif? It's right in the middle of my two favorite themes, onedark and gruvbox.

rewgs | 9 hours ago

I really love all the "modern" takes on classic tools by the Rust community.

I'm using eza (aka exa), aliased as ls, which has "tree" built in (aliased as lt), amongst others, as replacement for "ls" and it's one of my biggest production boosts in daily commandline use. Because eza has the tree built in, and the tree is also insanely fast, I won't be needing this tool - yet. Maybe one day the interactive mode will pull me over.

Congrats on releasing. And kudo's to how well you've released it: solid README, good description, good-looking gifs with exactly the right feature highlights

berkes | 8 hours ago

Neat, looks like a combination of erdtree[0] and broot[1]. I use both on a daily basis, are there any features that stand out from the two?

[0]: https://github.com/solidiquis/erdtree [1]: https://github.com/Canop/broot

aystatic | 14 hours ago

[dead]

ironuchan | 11 hours ago

[dead]

be87581d | 11 hours ago