mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-18 16:45:38 -05:00
$out is an array so just grab strings at indices
@@ -18,8 +18,8 @@ fe() {
|
|||||||
fo() {
|
fo() {
|
||||||
local out file key
|
local out file key
|
||||||
IFS=$'\n' out=($(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o,ctrl-e))
|
IFS=$'\n' out=($(fzf-tmux --query="$1" --exit-0 --expect=ctrl-o,ctrl-e))
|
||||||
key=$(head -1 <<< "$out")
|
key=${out[0]}
|
||||||
file=$(head -2 <<< "$out" | tail -1)
|
file=${out[1]}
|
||||||
if [ -n "$file" ]; then
|
if [ -n "$file" ]; then
|
||||||
[ "$key" = ctrl-o ] && open "$file" || ${EDITOR:-vim} "$file"
|
[ "$key" = ctrl-o ] && open "$file" || ${EDITOR:-vim} "$file"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user