Skip to content

Commit c8b9830

Browse files
scopakinomyoga
andcommitted
refactor(_comp_compgen_commands): simplify -o filenames handling
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
1 parent c39d2e3 commit c8b9830

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

bash_completion

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2707,9 +2707,8 @@ _complete_as_root()
27072707
_comp_compgen_commands()
27082708
{
27092709
[[ ! ${cur-} ]] && shopt -q no_empty_cmd_completion && return
2710-
_comp_compgen -- -c -o plusdirs
2711-
# for e.g. spaces in paths to and in command names
2712-
((${#COMPREPLY[@]} == 0)) || compopt -o filenames
2710+
# -o filenames for e.g. spaces in paths to and in command names
2711+
_comp_compgen -- -c -o plusdirs && compopt -o filenames
27132712
}
27142713

27152714
# @since 2.12

0 commit comments

Comments
 (0)