Skip to content

Commit

Permalink
[docs] update fzf_fd_opts example
Browse files Browse the repository at this point in the history
In fd 9.0.0, .git/ is ignored by default when using --hidden

Also replace instances of "call" with "execute" because call is typically used to describe transfering control to other functions within the same program, and execute is more commonly used to describe running commands.
  • Loading branch information
PatrickF1 committed Dec 20, 2023
1 parent 46c7bc6 commit be2b165
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ Find more ideas and implementation tips in the [Cookbook](https://github.com/Pat

### Change how Search Directory previews directories and regular files

[Search Directory][], by default, calls `ls` to preview directories and `bat` to preview [regular files](https://stackoverflow.com/questions/6858452).
[Search Directory][], by default, executes `ls` to preview directories and `bat` to preview [regular files](https://stackoverflow.com/questions/6858452).

To use your own directory preview command, set it in `fzf_preview_dir_cmd`:

Expand All @@ -158,17 +158,17 @@ Omit the target path for both variables as `fzf.fish` will itself [specify the a

### Change what files are listed in Search Directory

To pass custom options to `fd` when it is executed to populate the list of files for [Search Directory][], set them in `fzf_fd_opts`. For example, this includes hidden files but not `.git`:
To pass custom options to `fd` when [Search Directory][] executes it to populate the list of files, set them in `fzf_fd_opts`:

```fish
set fzf_fd_opts --hidden --exclude=.git
set fzf_fd_opts --hidden --max-depth 5
```

<a id='fd-gi'></a>By default, `fd` hides files listed in `.gitignore`. You can disable this behavior by adding the `--no-ignore` flag to `fzf_fd_opts`.

### Change the commit formatting used by Search Git Log

[Search Git Log][] calls `git log --format` to format the list of commits. To use your own [commit log format](https://git-scm.com/docs/git-log#Documentation/git-log.txt-emnem), set it in `fzf_git_log_format`. For example, this shows the hash and subject for each commit:
[Search Git Log][] executes `git log --format` to format the list of commits. To use your own [commit log format](https://git-scm.com/docs/git-log#Documentation/git-log.txt-emnem), set it in `fzf_git_log_format`. For example, this shows the hash and subject for each commit:

```fish
set fzf_git_log_format "%H %s"
Expand Down

0 comments on commit be2b165

Please sign in to comment.