m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 00:53:42 -05:00

Updated Examples (markdown)

Matthew Bennett
2020-10-17 17:50:36 +02:00
parent c376f1778b
commit e1e539e7e5

@@ -120,14 +120,18 @@ fo() {
}
```
Run command/application and choose paths/files with fzf.
Always return control of the termainal to user (e.g. when opening GUIs).
```sh
# select files with fzf and send to command.
# Put non-GUI processes in the foreground
# Usage:
# f cd (hit enter, choose path)
# f cat (hit enter, choose files)
# f vim (hit enter, choose files)
# f vlc (hit enter, choose files)
f cd # (hit enter, choose path)
f cat # (hit enter, choose files)
f vim # (hit enter, choose files)
f vlc # (hit enter, choose files)
```
The function:
```sh
f() {
# store the files from fzf
IFS=$'\n' files=($(fzf --query="$2" --multi))