bashrc & zshrc: if apt exists, use it!

Alias aptitude, apt-get and apt-cache to apt if /usr/bin/apt exists.
This commit is contained in:
Mikaela Suomalainen 2014-04-20 13:12:54 +03:00
parent fe2f84234f
commit d3534b1370
2 changed files with 16 additions and 0 deletions

8
bashrc
View File

@ -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

8
zshrc
View File

@ -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