From d3534b13709aac976090fd3c7e64adb411760d5f Mon Sep 17 00:00:00 2001 From: Mikaela Suomalainen Date: Sun, 20 Apr 2014 13:12:54 +0300 Subject: [PATCH] bashrc & zshrc: if apt exists, use it! Alias aptitude, apt-get and apt-cache to apt if /usr/bin/apt exists. --- bashrc | 8 ++++++++ zshrc | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/bashrc b/bashrc index fdec12ff..26d6b86e 100644 --- a/bashrc +++ b/bashrc @@ -482,6 +482,14 @@ pkcs11so=`locate opensc-pkcs11.so` alias ssh-add-sc="ssh-add -s $opensc-pkcs11.so" alias ssh-add-sc-pub="ssh-add -L" +# apt in Ubuntu 14.04+ and other distributions + +if [ -f /usr/bin/apt ]; then + alias aptitude=apt + alias apt-get=apt + alias apt-cache=apt +fi + # Allow custom aliases to be put in .aliases or .bash_aliases . # .aliases diff --git a/zshrc b/zshrc index 7a7b5e2d..876b9f7f 100644 --- a/zshrc +++ b/zshrc @@ -455,6 +455,14 @@ pkcs11so=`locate opensc-pkcs11.so` alias ssh-add-sc="ssh-add -s $pkcs11so" alias ssh-add-sc-pub="ssh-add -L" +# apt in Ubuntu 14.04+ and other distributions + +if [ -f /usr/bin/apt ]; then + alias aptitude=apt + alias apt-get=apt + alias apt-cache=apt +fi + # .aliases if [ -f ~/.aliases ]; then source ~/.aliases