From 332e03010ab32f3f89dc65baed3ed15ed3df3b5e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 6 Oct 2016 13:39:34 +0200 Subject: [PATCH] zsh aliases: arch linux/debian pakage manager detection --- zsh/aliases | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/zsh/aliases b/zsh/aliases index 5b4c45a8..2f82d873 100644 --- a/zsh/aliases +++ b/zsh/aliases @@ -177,8 +177,12 @@ case $OSTYPE in alias codekit='open -a CodeKit' ;; "linux"*) - alias apt='sudo apt-get' - alias aptu='sudo apt-get update && sudo apt-get upgrade' + is-callable apt-get && \ + alias apt='sudo apt-get' && \ + alias aptu'sudo apt-get update && sudo apt-get upgrade' + is-callable pacman && \ + alias pac='sudo pacman' && \ + alias pacu='sudo pacman -Syu' ;; "cygwin"*) ;;