Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Mar 2, 2024
1 parent 4e00c11 commit 2bd182c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,14 +233,14 @@ find * -type f | fzf > selected
Without STDIN pipe, fzf will traverse the file system under the current
directory to get the list of files.

> You can override the default behavior
> * By setting `$FZF_DEFAULT_COMMAND` to a command that generates the desired list
> * Or by setting `--walker`, `--walker-root`, and `--walker-skip` options in `$FZF_DEFAULT_OPTS`
```sh
vim $(fzf)
```

> You can override the default behavior
> * Either by setting `$FZF_DEFAULT_COMMAND` to a command that generates the desired list
> * Or by setting `--walker`, `--walker-root`, and `--walker-skip` options in `$FZF_DEFAULT_OPTS`
> *:bulb: A more robust solution would be to use `xargs` but we've presented
> the above as it's easier to grasp*
> ```sh
Expand Down Expand Up @@ -398,6 +398,7 @@ fish.
```sh
# Preview file content using bat (https://github.com/sharkdp/bat)
export FZF_CTRL_T_OPTS="
--walker-skip .git,node_modules,target
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
```
Expand All @@ -422,7 +423,9 @@ fish.
- Set `FZF_ALT_C_OPTS` to pass additional options to fzf
```sh
# Print tree structure in the preview window
export FZF_ALT_C_OPTS="--preview 'tree -C {}'"
export FZF_ALT_C_OPTS="
--walker-skip .git,node_modules,target
--preview 'tree -C {}'"
```
If you're on a tmux session, you can start fzf in a tmux split-pane or in
Expand Down

0 comments on commit 2bd182c

Please sign in to comment.