From f68dcb2f0fefcaaa98d571bc2123ec7897d9af62 Mon Sep 17 00:00:00 2001 From: Marek Blaha Date: Tue, 30 Apr 2019 09:52:30 +0200 Subject: [PATCH] [bash completion] Avoid potential hangs in _dnf_show_packages (RhBug:1702854) This is basically reusing fixes introduced in commit 36bf3730b6e431e6d6ba19bbdeee444f385e529f 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 --- etc/bash_completion.d/dnf | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/etc/bash_completion.d/dnf b/etc/bash_completion.d/dnf index d95cb17cfd..9b7c666946 100644 --- a/etc/bash_completion.d/dnf +++ b/etc/bash_completion.d/dnf @@ -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