mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-15 01:44:03 +00:00
[bash] Update completion.bash
[bash] Update completion.bash
This commit is contained in:
commit
c3aa836ec0
@ -272,14 +272,15 @@ if type _completion_loader > /dev/null 2>&1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
_fzf_defc() {
|
_fzf_defc() {
|
||||||
local cmd func opts orig_var orig
|
local cmd func opts orig_var orig def
|
||||||
cmd="$1"
|
cmd="$1"
|
||||||
func="$2"
|
func="$2"
|
||||||
opts="$3"
|
opts="$3"
|
||||||
orig_var="_fzf_orig_completion_$cmd"
|
orig_var="_fzf_orig_completion_$cmd"
|
||||||
orig="${!orig_var}"
|
orig="${!orig_var}"
|
||||||
if [ -n "$orig" ]; then
|
if [ -n "$orig" ]; then
|
||||||
eval "$(printf "$orig" "$func")"
|
printf -v def "$orig" "$func"
|
||||||
|
eval "$def"
|
||||||
else
|
else
|
||||||
complete -F "$func" $opts "$cmd"
|
complete -F "$func" $opts "$cmd"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user