summaryrefslogtreecommitdiff
path: root/plugins/debian/debian.plugin.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/debian/debian.plugin.zsh')
-rw-r--r--plugins/debian/debian.plugin.zsh14
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh
index 68c6df1ae..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'
@@ -66,7 +66,7 @@ if [[ $use_sudo -eq 1 ]]; then
alias di="sudo dpkg -i"
# Remove ALL kernel images and headers EXCEPT the one in use
- alias kclean='sudo aptitude remove -P ?and(~i~nlinux-(ima|hea) ?not(~n$(uname -r)))'
+ alias kclean='sudo aptitude remove -P "?and(~i~nlinux-(ima|hea) ?not(~n$(uname -r)))"'
# commands using su #########
@@ -105,7 +105,7 @@ else
alias di='su -lc "dpkg -i" root'
# Remove ALL kernel images and headers EXCEPT the one in use
- alias kclean='su -lc "aptitude remove -P ?and(~i~nlinux-(ima|hea) ?not(~n$(uname -r)))" root'
+ alias kclean='su -lc "aptitude remove -P \"?and(~i~nlinux-(ima|hea) ?not(~n$(uname -r)))\"" root'
fi
# Completion ################################################################