Skip to content

Commit

Permalink
completion: split dnf_commands_helper() command and options
Browse files Browse the repository at this point in the history
The completion helper command is a bit long.  Split the command and
options into local variables to improve readability.

Closes: #894
Approved by: m-blaha
  • Loading branch information
tmzullinger authored and rh-atomic-bot committed May 30, 2018
1 parent 36bf373 commit dd133ab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion etc/bash_completion.d/dnf
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ _dnf_set_python_exec()

_dnf_commands_helper()
{
echo "$( ${__dnf_python_exec} -c "import sys; from dnf.cli import completion_helper as ch; ch.main(sys.argv[1:])" "$@" -d 0 -q -C --assumeno --nogpgcheck 2>/dev/null </dev/null )"
local helper_cmd="import sys; from dnf.cli import completion_helper as ch; ch.main(sys.argv[1:])"
local helper_opts="-d 0 -q -C --assumeno --nogpgcheck"
echo "$( ${__dnf_python_exec} -c "$helper_cmd" "$@" $helper_opts 2>/dev/null </dev/null )"
}

_dnf_is_path()
Expand Down

0 comments on commit dd133ab

Please sign in to comment.