From 535eff6eb1b0600f4954d491625426691a9d056f Mon Sep 17 00:00:00 2001 From: Kevin Lau Date: Tue, 29 Nov 2016 00:53:04 -0800 Subject: [PATCH] $out is an array so just grab strings at indices --- Examples.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Examples.md b/Examples.md index 2d40705..77ef927 100644 --- a/Examples.md +++ b/Examples.md @@ -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