Skip to content

Commit

Permalink
[bash completion] Avoid potential hangs in _dnf_show_packages (RhBug:…
Browse files Browse the repository at this point in the history
…1702854)

This is basically reusing fixes introduced in commit
36bf373
on another place where the bash completion might get stuck.

https://bugzilla.redhat.com/show_bug.cgi?id=1702854

Closes: #1390
Approved by: Conan-Kudo
  • Loading branch information
m-blaha authored and rh-atomic-bot committed May 3, 2019
1 parent a5895a8 commit f68dcb2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions etc/bash_completion.d/dnf
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ _dnf_show_packages()
shift

if ! _dnf_is_path "$cur"; then
COMPREPLY+=( $(compgen -W '$( ${__dnf_python_exec} -c \
"import sys; from dnf.cli import completion_helper as ch;ch.main(sys.argv[1:])" \
$cmd "$@" "$cur" -d 0 -q -C 2>/dev/null )') )
COMPREPLY+=( $(compgen -W "$( _dnf_commands_helper $cmd "$@" "$cur" )") )
fi

[[ $COMPREPLY ]] && return
Expand Down

0 comments on commit f68dcb2

Please sign in to comment.