This commit is contained in:
Andrew Schwartzmeyer 2017-05-02 02:20:23 +00:00 committed by GitHub
commit 9fd0e0bb16
7 changed files with 203 additions and 9 deletions

View file

@ -5,9 +5,19 @@
#
# Debian-related zsh aliases and functions for zsh
# Function to check if a command exists
exists() {
if command -v $1 >/dev/null 2>&1
then
return 0
else
return 1
fi
}
# Use aptitude if installed, or apt-get if not.
# You can just set apt_pref='apt-get' to override it.
if [[ -e $( which -p aptitude 2>&1 ) ]]; then
if exists aptitude; then
apt_pref='aptitude'
apt_upgr='safe-upgrade'
else
@ -16,7 +26,7 @@ else
fi
# Use sudo by default if it's installed
if [[ -e $( which -p sudo 2>&1 ) ]]; then
if exists sudo; then
use_sudo=1
fi