Add --strip-cwd-prefix to fd examples

This commit is contained in:
Junegunn Choi 2022-08-08 13:38:21 +09:00
parent d826f9e72f
commit bb07410448
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

@ -662,10 +662,10 @@ default find command to traverse the file system while respecting
```sh ```sh
# Feed the output of fd into fzf # Feed the output of fd into fzf
fd --type f | fzf fd --type f --strip-cwd-prefix | fzf
# Setting fd as the default source for fzf # Setting fd as the default source for fzf
export FZF_DEFAULT_COMMAND='fd --type f' export FZF_DEFAULT_COMMAND='fd --type f --strip-cwd-prefix'
# Now fzf (w/o pipe) will use fd instead of find # Now fzf (w/o pipe) will use fd instead of find
fzf fzf
@ -678,7 +678,7 @@ If you want the command to follow symbolic links and don't want it to exclude
hidden files, use the following command: hidden files, use the following command:
```sh ```sh
export FZF_DEFAULT_COMMAND='fd --type f --hidden --follow --exclude .git' export FZF_DEFAULT_COMMAND='fd --type f --strip-cwd-prefix --hidden --follow --exclude .git'
``` ```
#### Fish shell #### Fish shell