From daf3046a35f012da3628476911cb27e34fdae16b Mon Sep 17 00:00:00 2001 From: Jake Zimmerman Date: Tue, 12 May 2020 23:39:28 -0500 Subject: [PATCH] Add as-tree to the README Suggested in this comment: https://github.com/sharkdp/fd/issues/283#issuecomment-627465260 --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 32e589c..b984529 100644 --- a/README.md +++ b/README.md @@ -554,6 +554,29 @@ After installing `find-file-in-project`, add the line `(setq ffip-use-rust-fd t) In emacs, run `M-x find-file-in-project-by-selected` to find matching files. Alternatively, run `M-x find-file-in-project` to list all available files in the project. +#### Printing fd's output as a tree + +To format the output of `fd` similar to the `tree` command, install [`as-tree`] and pipe the output +of `fd` to `as-tree`: +```bash +fd | as-tree +``` + +This can be more useful than running `tree` by itself because `tree` does not ignore any files by +default, nor does it support as rich a set of options as `fd` does to control what to print: +```bash +❯ fd --extension rs | as-tree +. +├── build.rs +└── src + ├── app.rs + └── error.rs +``` + +For more information about `as-tree`, see [the `as-tree` README][`as-tree`]. + +[`as-tree`]: https://github.com/jez/as-tree + ## License Copyright (c) 2017-2020 The fd developers