From e1e539e7e5214e96d0b92e36ec82f7222f186e99 Mon Sep 17 00:00:00 2001 From: Matthew Bennett Date: Sat, 17 Oct 2020 17:50:36 +0200 Subject: [PATCH] Updated Examples (markdown) --- Examples.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Examples.md b/Examples.md index c3f80ea..b572521 100644 --- a/Examples.md +++ b/Examples.md @@ -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))