Since Fedora will use dnf as default package manager in its next release, is there available autocompletion for zsh/oh-my-zsh/zpretzo?

If not, is there somebody willing to do it? :D


a work around :

cp /usr/share/zsh/5.0.7/functions/_yum /usr/share/zsh/5.0.7/functions/_dnf

then :

vi /usr/share/zsh/5.0.7/functions/_dnf 

and under vim type:


save and exit vim ( type :x and Enter) relog under zsh and enjoy. via

  • Well, that's certainly an option :D Recently a zsh prezto got a dnf module so there is no need anymore. But thanks anyway :) – NefariousOctopus May 31 '15 at 19:44

My zsh (5.1) already has support for dnf:

% rpm -qf /usr/share/zsh//5.1/functions/_dnf

Until there is a proper completion module for dnf, you can use yum completion. Just add this simple line into your zshrc:

compdef dnf=yum

This line must be placed anywhere after completion initialization.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.