Skip to content
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

fix(README.md): as-tree is unmaintained, fixes #1040 #1386

Merged
merged 1 commit into from
Oct 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -488,26 +488,28 @@ In emacs, run `M-x find-file-in-project-by-selected` to find matching files. Alt

### Printing the 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`:
To format the output of `fd` as a file-tree you can use the `tree` command with
`--fromfile`:
```bash
fd | as-tree
fd | tree --fromfile
```

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:
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
❯ fd --extension rs | tree --fromfile
.
├── 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
On bash and similar you can simply create an alias:
```bash
❯ alias as-tree='tree --fromfile'
```

### Using fd with `xargs` or `parallel`

Expand Down