Skip to content
Myr

[bash] Fix default completion of unset, unalias, etc

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Fix #3679

authored by Junegunn Choi · committed by Junegunn Choi · parent b29bd80 · Browse files · 1 file+11 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+11 added−3 removed

  • other:+11 added−3 removed

1 file+11 added−3 removed

modified:shell/completion.bash+11 added-3 removed
289 unmodified lines
290 if __fzf_orig_completion_get_orig_func "$cmd"; then291 "$REPLY" "$@"292 elif [[ -n "${_fzf_completion_loader-}" ]]; then293 orig_complete=$(complete -p "$orig_cmd" 2> /dev/null)294 _completion_loader "$@"294 $_fzf_completion_loader "$@"295 ret=$?296 # _completion_loader may not have updated completion for the command297 if [[ "$(complete -p "$orig_cmd" 2> /dev/null)" != "$orig_complete" ]]; then298 __fzf_orig_completion < <(complete -p "$orig_cmd" 2> /dev/null)
216 unmodified lines
515516# Preserve existing completion517__fzf_orig_completion < <(complete -p $d_cmds $a_cmds ssh 2> /dev/null)518519if type _completion_loader > /dev/null 2>&1; then520 _fzf_completion_loader=1519if type _comp_load > /dev/null 2>&1; then520 # _comp_load was added in bash-completion 2.12 to replace _completion_loader.521 # We use it without -D option so that it does not use _comp_complete_minimal as the fallback.522 _fzf_completion_loader=_comp_load523elif type __load_completion > /dev/null 2>&1; then524 # In bash-completion 2.11, _completion_loader internally calls __load_completion525 # and if it returns a non-zero status, it sets the default 'minimal' completion.526 _fzf_completion_loader=__load_completion527elif type _completion_loader > /dev/null 2>&1; then528 _fzf_completion_loader=_completion_loader529fi530531__fzf_defc() {532 local cmd func opts REPLY
50 unmodified lines