Commit e2401350 authored by Gene Pavlovsky's avatar Gene Pavlovsky
Browse files

Update completion.bash

Fixes #548. Avoid using a subshell in _fzf_defc().
parent e867355b
Showing with 3 additions and 2 deletions
+3 -2
......@@ -272,14 +272,15 @@ if type _completion_loader > /dev/null 2>&1; then
fi
_fzf_defc() {
local cmd func opts orig_var orig
local cmd func opts orig_var orig def
cmd="$1"
func="$2"
opts="$3"
orig_var="_fzf_orig_completion_$cmd"
orig="${!orig_var}"
if [ -n "$orig" ]; then
eval "$(printf "$orig" "$func")"
printf -v def "$orig" "$func"
eval "$def"
else
complete -F "$func" $opts "$cmd"
fi
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment