summaryrefslogtreecommitdiff
path: root/fzf-completion.bash
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2014-07-04 21:05:46 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2014-07-04 21:05:46 +0900
commit03f155484cd7aaa2baaf10015c151941453e320c (patch)
tree987f158aeed552a512f0f75ec8603dd1b7868daa /fzf-completion.bash
parent3b14c5230c3b5ad0d2f179f3bbb0e26563f3aae5 (diff)
downloadfzf-03f155484cd7aaa2baaf10015c151941453e320c.tar.gz
[bash-completion] Merge eval statements into one
Diffstat (limited to 'fzf-completion.bash')
-rw-r--r--fzf-completion.bash5
1 files changed, 1 insertions, 4 deletions
diff --git a/fzf-completion.bash b/fzf-completion.bash
index 9924b0a8..ae03bb5e 100644
--- a/fzf-completion.bash
+++ b/fzf-completion.bash
@@ -157,13 +157,10 @@ a_cmds="
# Preserve existing completion
if [ "$_fzf_completion_loaded" != '0.8.6' ]; then
# Really wish I could use associative array but OSX comes with bash 3.2 :(
- while read line; do
- eval $line
- done < <(complete | grep '\-F' | grep -v _fzf_ |
+ eval $(complete | grep '\-F' | grep -v _fzf_ |
grep -E -w "$(echo $d_cmds $f_cmds $a_cmds | sed 's/ /|/g' | sed 's/+/\\+/g')" |
sed -E 's/.*-F *([^ ]*).* ([^ ]*)$/_fzf_orig_completion_\2=\1/' |
sed 's/[^a-z0-9_=]/_/g')
- unset line
export _fzf_completion_loaded=0.8.6
fi