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

$out is an array so just grab strings at indices

Kevin Lau
2016-11-29 00:53:04 -08:00
parent 99d13f3988
commit 535eff6eb1

@@ -18,8 +18,8 @@ fe() {
fo() {
local out file key
IFS=$'\n' out=($(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o,ctrl-e))
key=$(head -1 <<< "$out")
file=$(head -2 <<< "$out" | tail -1)
key=${out[0]}
file=${out[1]}
if [ -n "$file" ]; then
[ "$key" = ctrl-o ] && open "$file" || ${EDITOR:-vim} "$file"
fi