-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request: add --tree flag #283
Comments
Thank you for your feedback.
Why do you want this to be included? Do you see a strong use case for this? It would certainly be possible somehow, but:
Overall, to be honest, I don't feel like this would be worth the effort. Maybe a second program could help here. I tried to use |
The appeal to me is simply that it's nicer to view when there is a large number of results in multiple subdirectories. If it requires a large overhaul to existing code though then it sounds like a poor fit. I'll see if some concoction of shell scripting can produce the desired output. |
Unfortunately, I think this is out of the scope for |
👋 I built the suggested external program: |
Very cool! Thanks for posting this here. If you want to add Note that there are some weird edge-cases (like filenames including newline-characters) which would not work when simply piping to Alternatively, you could also accept paths as arguments and use |
If you like, we could add a section to the README: https://github.com/sharkdp/fd#integration-with-other-programs |
https://github.com/jez/as-tree/compare/jez-lscolors ^ I actually was working on that last night. I was meaning to say: it's a wonderful library! I'm so glad it exists. Simple to use and worked exactly as expected. Thanks for building it as a standalone library!
Thanks for the heads up, I'll consider adding a -0 flag or something.
¯_(ツ)_/¯ I'm not opposed but I'd like to at least polish it a bit more if I were to add it there. Thanks again, I'll keep you posted. |
Ah, cool - thank you for the feedback! |
Suggested in this comment: sharkdp#283 (comment)
Suggested in this comment: #283 (comment)
Just an FYI @jez & @sharkdp: It's currently possible right now today to pipe the output of Example: # note the output of fd first
$ fd .
dir1
dir1/child1
dir1/child1/foo.txt
dir2
dir2/bar.txt
# now note the output of the same command, but piped to tree using --fromfile
$ fd . | tree --fromfile .
.
├── dir1
│ └── child1
│ └── foo.txt
└── dir2
└── bar.txt
3 directories, 2 files |
Would it be possible to include a --tree flag which produces output similar to
tree
? I saw this was briefly mentioned in #107, but the issue was actually about something else.The text was updated successfully, but these errors were encountered: