From 648f61c491d0b38b05aa68c339c7338f1de23007 Mon Sep 17 00:00:00 2001 From: Sascha Rudolph Date: Fri, 2 Jun 2017 22:53:31 +0200 Subject: [PATCH] 6098 - add support for apt in debian plugin Signed-off-by: Sascha Rudolph --- plugins/debian/debian.plugin.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 28131ff80..8cafcb4a4 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/plugins/debian/debian.plugin.zsh @@ -5,9 +5,12 @@ # # Debian-related zsh aliases and functions for zsh -# Use aptitude if installed, or apt-get if not. +# Use apt or aptitude if installed, fallback is apt-get # You can just set apt_pref='apt-get' to override it. -if [[ -e $( which -p aptitude 2>&1 ) ]]; then +if [[ -e $( which -p apt 2>&1 ) ]]; then + apt_pref='apt' + apt_upgr='upgrade' +elif [[ -e $( which -p aptitude 2>&1 ) ]]; then apt_pref='aptitude' apt_upgr='safe-upgrade' else