From 1fc51391a5e4653c470b1c62d214aa869f8fdbd8 Mon Sep 17 00:00:00 2001 From: Andy Weidenbaum Date: Sun, 6 Dec 2015 20:51:47 -0800 Subject: [PATCH] fix fe function for files containing whitespace --- Examples.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Examples.md b/Examples.md index 841c5b0..54c1add 100644 --- a/Examples.md +++ b/Examples.md @@ -7,8 +7,10 @@ You can replace `fzf` command on each example with [`fzf-tmux`](https://github.c # - Bypass fuzzy finder if there's only one match (--select-1) # - Exit if there's no match (--exit-0) fe() { + IFS=' +' local declare files=($(fzf-tmux --query="$1" --select-1 --exit-0)) - [[ -n "$files" ]] && ${EDITOR:-vim} ${files[@]} + [[ -n "$files" ]] && ${EDITOR:-vim} "${files[@]}" } # Modified version where you can press