mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge 3da5eb59b7 into 5667161d49
This commit is contained in:
commit
9fd0e0bb16
7 changed files with 203 additions and 9 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue