Skip to content

Commit

Permalink
refactor(_comp_compgen_commands): simplify -o filenames handling
Browse files Browse the repository at this point in the history
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
  • Loading branch information
scop and akinomyoga committed Jun 1, 2023
1 parent c39d2e3 commit c8b9830
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -2707,9 +2707,8 @@ _complete_as_root()
_comp_compgen_commands()
{
[[ ! ${cur-} ]] && shopt -q no_empty_cmd_completion && return
_comp_compgen -- -c -o plusdirs
# for e.g. spaces in paths to and in command names
((${#COMPREPLY[@]} == 0)) || compopt -o filenames
# -o filenames for e.g. spaces in paths to and in command names
_comp_compgen -- -c -o plusdirs && compopt -o filenames
}

# @since 2.12
Expand Down

0 comments on commit c8b9830

Please sign in to comment.