Skip to content
Myr

Update README

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent f1f31ba · Browse files · 1 file+8 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−8 removed

  • other:+8 added−8 removed

1 file+8 added−8 removed

modified:README.md+8 added-8 removed
413 unmodified lines
414[perf]: https://junegunn.kr/images/fzf-0.16.10.png415416### Executing external programs417418You can set up key bindings for starting external process in the foreground419(`execute`) or in the background (`execute-silent`).418You can set up key bindings for starting external processes without leaving419fzf (`execute`, `execute-silent`).420421```sh422# Press F1 to open the file with less without exiting fzf421```bash422# Press F1 to open the file with less without leaving fzf423# Press CTRL-Y to copy the line to clipboard and aborts fzf (requires pbcopy)424fzf --bind 'f1:execute(less -f {}),ctrl-y:execute-silent(echo {} | pbcopy)+abort'425```426
3 unmodified lines
430431When `--preview` option is set, fzf automatically starts external process with432the current line as the argument and shows the result in the split window.433434```sh434```bash435# {} is replaced to the single-quoted string of the focused line436fzf --preview 'cat {}'437```438439Since preview window is updated only after the process is complete, it's440important that the command finishes quickly.441442```sh442```bash443# Use head instead of cat so that the command doesn't take too long to finish444fzf --preview 'head -100 {}'445```446
3 unmodified lines
450- Highlight: http://www.andre-simon.de/doku/highlight/en/highlight.php451- CodeRay: http://coderay.rubychan.de/452- Rouge: https://github.com/jneen/rouge453454```sh454```bash455# Try highlight, coderay, rougify in turn, then fall back to cat456fzf --preview '[[ $(file --mime {}) =~ binary ]] &&457 echo {} is a binary file ||458 (highlight -O ansi -l {} ||
4 unmodified lines
463464You can customize the size and position of the preview window using465`--preview-window` option. For example,466467```sh467```bash468fzf --height 40% --reverse --preview 'file {}' --preview-window down:1469```470471For more advanced examples, see [Key bindings for git with fzf][fzf-git].
86 unmodified lines