mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
Merge 1f1d4a29e2 into 90c28b786a
This commit is contained in:
commit
366745816a
1 changed files with 10 additions and 2 deletions
|
|
@ -1,11 +1,14 @@
|
||||||
# Authors:
|
# Authors:
|
||||||
# https://github.com/AlexBio
|
# https://github.com/AlexBio
|
||||||
# https://github.com/dbb
|
# https://github.com/dbb
|
||||||
|
# https://github.com/asm0dey
|
||||||
#
|
#
|
||||||
# Debian-related zsh aliases and functions for zsh
|
# Debian-related zsh aliases and functions for zsh
|
||||||
|
|
||||||
# Use aptitude if installed, or apt-get if not.
|
# Use apt-fast if installed, if not - aptitude, if not too - apt-get.
|
||||||
# You can just set apt_pref='apt-get' to override it.
|
# You can just set apt_pref='apt-get' to override it.
|
||||||
|
if [[ -e $( which -p apt-fast 2>&1 ) ]]; then
|
||||||
|
apt_pref='apt-fast'
|
||||||
if [[ -e $( which -p aptitude 2>&1 ) ]]; then
|
if [[ -e $( which -p aptitude 2>&1 ) ]]; then
|
||||||
apt_pref='aptitude'
|
apt_pref='aptitude'
|
||||||
else
|
else
|
||||||
|
|
@ -67,7 +70,7 @@ if [[ $use_sudo -eq 1 ]]; then
|
||||||
# Remove ALL kernel images and headers EXCEPT the one in use
|
# Remove ALL kernel images and headers EXCEPT the one in use
|
||||||
alias kclean='sudo aptitude remove -P ?and(~i~nlinux-(ima|hea) \
|
alias kclean='sudo aptitude remove -P ?and(~i~nlinux-(ima|hea) \
|
||||||
?not(~n`uname -r`))'
|
?not(~n`uname -r`))'
|
||||||
|
alias aar='sudo add-apt-repository -y'
|
||||||
|
|
||||||
# commands using su #########
|
# commands using su #########
|
||||||
else
|
else
|
||||||
|
|
@ -83,6 +86,11 @@ else
|
||||||
alias adu='su -lc \'$apt_pref update && aptitude dist-upgrade\' root'
|
alias adu='su -lc \'$apt_pref update && aptitude dist-upgrade\' root'
|
||||||
alias afu='su -lc "apt-file update"'
|
alias afu='su -lc "apt-file update"'
|
||||||
alias ag='su -lc \'$apt_pref safe-upgrade\' root'
|
alias ag='su -lc \'$apt_pref safe-upgrade\' root'
|
||||||
|
alias aar(){
|
||||||
|
cmd="su -lc 'add-apt-repository -y $@' root"
|
||||||
|
print "$cmd"
|
||||||
|
eval "$cmd"
|
||||||
|
}
|
||||||
ai() {
|
ai() {
|
||||||
cmd="su -lc 'aptitude -P install $@' root"
|
cmd="su -lc 'aptitude -P install $@' root"
|
||||||
print "$cmd"
|
print "$cmd"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue