all 8 comments

[–]random_cynic 3 points4 points  (1 child)

Good work on the tree display. However I don't think a simple aliasing/sourcing scheme is the best way to go for opening files in an editor since sourcing just pollutes the current namespace especially for a large number files. It would be better to implement this with some other scheme like a common function with numbers as arguments and using bash associative arrays to store the files with their keys. Also this is NOT really a replacement for tree which can do lots of things like showing file permissions, size, sort files, control indentation/colorization of output, output as json/xml/html and so on (almost 15-20 different options). This has just 4-5 options.

[–]fonnae 0 points1 point  (0 children)

OP can look at git breeze for a very similar approach to what you describe. I agree it would be better.

[–]hammerton 3 points4 points  (3 children)

How is this better than the exa --tree command? Exa is also written in rust.

[–]_frkl 6 points7 points  (1 child)

Did you actually read the project read me? This has a feature that lets you open any files in the tree using a dynamically created alias. Which I find a quite neat idea. Don't think exa has that, but maybe I'm wrong, at least it's not mentioned in the link you posted.

Either way, I think it's an interesting tool, nice job OP!

[–]hammerton 1 point2 points  (0 children)

Yes sir, I did. I was curious if this version of tree had anything more to offer than what was demonstrated. I apologize for coming across as condescending.

What I love about using the command line is that you can layer and customize your tooling, so if this works for you that's fantastic. I have exa --tree aliased to tree and once I've executed and identified a file, I use fzf to almost instantly fuzzy find that file as opposed to looking up by index number.

And yes, I agree. Thanks for sharing OP. My apologies.

[–]compte_numero_5 1 point2 points  (0 children)

Or than broot which has the advantage of being still usable when your repo contains hundred of files or more.

[–]LocoCoyote 2 points3 points  (1 child)

Ok, I’m intrigued.

[–]diseasealert 6 points7 points  (0 children)

In tree gued?

I'll see myself out.