Skip to content

Commit b9c56eb

Browse files
scopakinomyoga
andcommitted
fix(_minimal): fall back to defaults instead of _filedir
We don't actually know if filenames are wanted here, so there's no reason to insist filename completions specifically. Besides, the bash and readline defaults handle the basic filename completions at least as well as `_filedir` does. They additionally make wildcard completions work. Remove no longer needed long option splitting, as it is no longer needed after this change. Closes #444 Co-authored-by: Koichi Murase <[email protected]>
1 parent 23885d8 commit b9c56eb

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bash_completion

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2487,10 +2487,9 @@ unset -f _install_xspec
24872487
# Minimal completion to use as fallback in _completion_loader.
24882488
_minimal()
24892489
{
2490-
local cur prev words cword split comp_args
2491-
_comp_initialize -s -- "$@" || return
2492-
$split && return
2493-
_filedir
2490+
local cur prev words cword comp_args
2491+
_comp_initialize -- "$@" || return
2492+
compopt -o bashdefault -o default
24942493
}
24952494
# Complete the empty string to allow completion of '>', '>>', and '<' on < 4.3
24962495
# https://lists.gnu.org/archive/html/bug-bash/2012-01/msg00045.html

0 commit comments

Comments
 (0)