From 26e9cead1a7c9264962986fdc3038ad7266c92bd Mon Sep 17 00:00:00 2001 From: Felix Stupp Date: Sat, 12 Jun 2021 14:10:06 +0000 Subject: feat(plugins): Plugin "debian": Switch order of "apt" and "aptitude" for detection (#7533) * Switch order of "apt" and "aptitude" for detection "apt" is installed by default at Debian (maybe Ubuntu too), while "aptitude" does not seem to be installed by default. For that, it may be better for most of the users to prefer "aptitude" if installed. * plugins/debian/README: Change of order mirroded into documentation --- plugins/debian/debian.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins/debian/debian.plugin.zsh') diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 108396784..bde97cd30 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' -- cgit v1.2.3-70-g09d2