You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -145,13 +145,13 @@ Find more ideas and implementation tips in the [Cookbook](https://github.com/Pat
145
145
146
146
[Search Directory][], by default, calls `ls` to preview directories and `bat` to preview [regular files](https://stackoverflow.com/questions/6858452).
147
147
148
-
To change the directory preview command (e.g. to use one of the many `ls` replacements such as `exa`), set `fzf_preview_dir_cmd` to the desired command:
148
+
To use your own directory preview command (e.g. to use one of the many `ls` replacements such as `exa`), set it in `fzf_preview_dir_cmd`:
149
149
150
150
```fish
151
151
set fzf_preview_dir_cmd exa --all --color=always
152
152
```
153
153
154
-
And to change the file preview command (e.g. to `cat` to avoid having to install `bat`, or to add logic for previewing images), set `fzf_preview_file_cmd` to the desired command:
154
+
And to use your own file preview command (e.g. to `cat` to avoid having to install `bat`, or to add logic for previewing images), set it in `fzf_preview_file_cmd`:
155
155
156
156
```fish
157
157
set fzf_preview_file_cmd cat -n
@@ -161,14 +161,24 @@ Omit the target path for both variables as `fzf.fish` will itself [specify the a
161
161
162
162
### Change what files are listed in Search Directory
163
163
164
-
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, to include hidden files but not `.git`:
164
+
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`:
165
165
166
166
```fish
167
167
set fzf_fd_opts --hidden --exclude=.git
168
168
```
169
169
170
170
<aid='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`.
171
171
172
+
### Change the commit formatting used by Search Git Log
173
+
174
+
[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:
175
+
176
+
```fish
177
+
set fzf_git_log_format "%H %s"
178
+
```
179
+
180
+
The format must be one line per commit and the hash must be the first field, or else Search Git Log will fail to determine which commits you selected.
181
+
172
182
## Further reading
173
183
174
184
Find answers to these questions and more in the [project Wiki](https://github.com/PatrickF1/fzf.fish/wiki):
@@ -188,4 +198,5 @@ Find answers to these questions and more in the [project Wiki](https://github.co
0 commit comments