Skip to content

Commit 37e7c64

Browse files
committed
Add as-tree to the README
Suggested in this comment: sharkdp#283 (comment)
1 parent 151eaad commit 37e7c64

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

+23
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,29 @@ After installing `find-file-in-project`, add the line `(setq ffip-use-rust-fd t)
554554
In emacs, run `M-x find-file-in-project-by-selected` to find matching files. Alternatively, run
555555
`M-x find-file-in-project` to list all available files in the project.
556556

557+
#### Printing fd's output as a tree
558+
559+
To format the output of `fd` similar to the `tree` command, install [`as-tree`] and pipe the output
560+
of `fd` to `as-tree`:
561+
```bash
562+
fd | as-tree
563+
```
564+
565+
This can be more useful than running `tree` by itself because `tree` does not ignore any files by
566+
default, nor does it support as rich a set of options as `fd` does to control what to print:
567+
```bash
568+
❯ fd --extension rs | as-tree
569+
.
570+
├── build.rs
571+
└── src
572+
├── app.rs
573+
└── error.rs
574+
```
575+
576+
For more information about `as-tree`, see [the `as-tree` README][`as-tree`].
577+
578+
[`as-tree`]: https://github.com/jez/as-tree
579+
557580
## License
558581
Copyright (c) 2017-2020 The fd developers
559582

0 commit comments

Comments
 (0)