From 478f289f7568fb2fac333753dbceace13773a87e Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Sun, 5 Apr 2015 02:59:57 +0900 Subject: [PATCH] fo --- Examples.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Examples.md b/Examples.md index fc1ac4e..bf0d402 100644 --- a/Examples.md +++ b/Examples.md @@ -12,11 +12,12 @@ fe() { [ -n "$file" ] && ${EDITOR:-vim} "$file" } -# Extended version where you can press CTRL-O to open with `open` command -# fe [FUZZY PATTERN] -fe() { +# Modified version where you can press +# - CTRL-O to open with `open` command, +# - CTRL-E or Enter key to open with the $EDITOR +fo() { local out file key - out=$(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o) + out=$(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o,ctrl-e) key=$(head -1 <<< "$out") file=$(head -2 <<< "$out" | tail -1) if [ -n "$file" ]; then