diff --git a/plugins/debian/README.md b/plugins/debian/README.md index da5675c66b8623831917922e034fb7fd04397f62..922d68cb3ba8c914e1776a2ce86c5fe5ad7f60b9 100644 --- a/plugins/debian/README.md +++ b/plugins/debian/README.md @@ -10,7 +10,7 @@ plugins=(... debian) ## Settings -- `$apt_pref`: use apt or aptitude if installed, fallback is apt-get. +- `$apt_pref`: use aptitude or apt if installed, fallback is apt-get. - `$apt_upgr`: use upgrade or safe-upgrade (for aptitude). Set `$apt_pref` and `$apt_upgr` to whatever command you want (before sourcing Oh My Zsh) to override this behavior. diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 10839678483724b802e8e17741c5ac84eb79bf34..bde97cd308a422258e32902653dca0feba687b49 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/plugins/debian/debian.plugin.zsh @@ -1,13 +1,13 @@ -# Use apt or aptitude if installed, fallback is apt-get +# Use aptitude or apt if installed, fallback is apt-get # You can just set apt_pref='apt-get' to override it. if [[ -z $apt_pref || -z $apt_upgr ]]; then - if [[ -e $commands[apt] ]]; then - apt_pref='apt' - apt_upgr='upgrade' - elif [[ -e $commands[aptitude] ]]; then + if [[ -e $commands[aptitude] ]]; then apt_pref='aptitude' apt_upgr='safe-upgrade' + elif [[ -e $commands[apt] ]]; then + apt_pref='apt' + apt_upgr='upgrade' else apt_pref='apt-get' apt_upgr='upgrade'