m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 08:13:40 -05:00

fo

Junegunn Choi
2015-04-05 02:59:57 +09:00
parent a9f3a5ee94
commit 478f289f75

@@ -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