Skip to content
Myr

[bash-completion] Avoid empty _a, _v completions

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

This doesn't look right: $ complete | grep ' _.$' complete _a complete _v The __fzf_orig_completion_filter invocation in _fzf_setup_completion needs the /-F/ filter, just like all the other invocations.

authored by Tomas Janousek · committed by Junegunn Choi · parent 722d66e · Browse files · 1 file+1 added−1 removed
This commit

State

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

Trailers

  • Fixes: d4ad4a25db5f ("[bash-completion] Fix default alias/variable completion")

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:shell/completion.bash+1 added-1 removed
351 unmodified lines
352 echo "usage: ${FUNCNAME[0]} path|dir|var|alias|host|proc COMMANDS..."353 return 1354 fi355 shift356 eval "$(complete -p "$@" 2> /dev/null | grep -v "$fn" | __fzf_orig_completion_filter)"356 eval "$(complete -p "$@" 2> /dev/null | sed '/-F/!d; / _fzf/d' | __fzf_orig_completion_filter)"357 for cmd in "$@"; do358 case "$kind" in359 dir) __fzf_defc "$cmd" "$fn" "-o nospace -o dirnames" ;;360 var) __fzf_defc "$cmd" "$fn" "-o default -o nospace -v" ;;
12 unmodified lines