mirror of
https://github.com/sharkdp/fd
synced 2024-11-02 07:51:38 +00:00
Add instructions on how to use fd with fzf
This commit is contained in:
parent
8dde7c3365
commit
b4ae0dca7e
1 changed files with 23 additions and 0 deletions
23
README.md
23
README.md
|
@ -331,3 +331,26 @@ If we want to run a command on all search results, we can pipe the output to `xa
|
|||
```
|
||||
Here, the `-0` option tells *fd* to separate search results by the NULL character (instead of .
|
||||
newlines) In the same way, the `-0` option of `xargs` tells it to read the input in this way .
|
||||
|
||||
### Using fd with `fzf`
|
||||
|
||||
You can use *fd* to generate input for the command-line fuzzy finder [fzf](https://github.com/junegunn/fzf):
|
||||
``` bash
|
||||
export FZF_DEFAULT_COMMAND='fd --type file'
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
```
|
||||
|
||||
Then, you can type `vim <Ctrl-T>` on your terminal to open fzf and search through the fd-results.
|
||||
|
||||
Alternatively, you might like to follow symbolic links and include hidden files (but exclude `.git` folders):
|
||||
``` bash
|
||||
export FZF_DEFAULT_COMMAND='fd --type file --follow --hidden --exclude .git'
|
||||
```
|
||||
|
||||
You can even use fd's colored output inside fzf by setting:
|
||||
``` bash
|
||||
export FZF_DEFAULT_COMMAND="fd --type file --color=always"
|
||||
export FZF_DEFAULT_OPTS="--ansi"
|
||||
```
|
||||
|
||||
For more details, see the [Tips section](https://github.com/junegunn/fzf#tips) of the fzf README.
|
||||
|
|
Loading…
Reference in a new issue