. /usr/share/bash-completion/completions/yum

complete -F _yum -o filenames dnf yummain.py
