Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Oh My Zsh
Commits
7daf7401
Commit
7daf7401
authored
Jun 14, 2015
by
Robby Russell
Browse files
Merge pull request #3874 from diraol/patch-2
Debian Plugin: Differing upgrade and safe-upgrade
parents
0665ece7
4d0aca48
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/debian/debian.plugin.zsh
View file @
7daf7401
...
@@ -9,8 +9,10 @@
...
@@ -9,8 +9,10 @@
# 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
aptitude 2>&1
)
]]
;
then
if
[[
-e
$(
which
-p
aptitude 2>&1
)
]]
;
then
apt_pref
=
'aptitude'
apt_pref
=
'aptitude'
apt_upgr
=
'safe-upgrade'
else
else
apt_pref
=
'apt-get'
apt_pref
=
'apt-get'
apt_upgr
=
'upgrade'
fi
fi
# Use sudo by default if it's installed
# Use sudo by default if it's installed
...
@@ -45,10 +47,10 @@ if [[ $use_sudo -eq 1 ]]; then
...
@@ -45,10 +47,10 @@ if [[ $use_sudo -eq 1 ]]; then
alias
abd
=
'sudo $apt_pref build-dep'
alias
abd
=
'sudo $apt_pref build-dep'
alias
ac
=
'sudo $apt_pref clean'
alias
ac
=
'sudo $apt_pref clean'
alias
ad
=
'sudo $apt_pref update'
alias
ad
=
'sudo $apt_pref update'
alias
adg
=
'sudo $apt_pref update && sudo $apt_pref upgr
ade
'
alias
adg
=
'sudo $apt_pref update && sudo $apt_pref
$apt_
upgr'
alias
adu
=
'sudo $apt_pref update && sudo $apt_pref dist-upgrade'
alias
adu
=
'sudo $apt_pref update && sudo $apt_pref dist-upgrade'
alias
afu
=
'sudo apt-file update'
alias
afu
=
'sudo apt-file update'
alias
ag
=
'sudo $apt_pref upgr
ade
'
alias
ag
=
'sudo $apt_pref
$apt_
upgr'
alias
ai
=
'sudo $apt_pref install'
alias
ai
=
'sudo $apt_pref install'
# Install all packages given on the command line while using only the first word of each line:
# Install all packages given on the command line while using only the first word of each line:
# acs ... | ail
# acs ... | ail
...
@@ -80,10 +82,10 @@ else
...
@@ -80,10 +82,10 @@ else
}
}
alias ac='
su
-ls
\'
$apt_pref
clean
\'
root
'
alias ac='
su
-ls
\'
$apt_pref
clean
\'
root
'
alias ad='
su
-lc
\'
$apt_pref
update
\'
root
'
alias ad='
su
-lc
\'
$apt_pref
update
\'
root
'
alias adg='
su
-lc
\'
$apt_pref
update
&&
aptitude
safe-
upgr
ade
\'
root
'
alias adg='
su
-lc
\'
$apt_pref
update
&&
aptitude
$apt_
upgr
\'
root
'
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-
upgr
ade
\'
root
'
alias ag='
su
-lc
\'
$apt_pref
$apt_
upgr
\'
root
'
ai() {
ai() {
cmd="su -lc '
aptitude
-P
install
$@
' root"
cmd="su -lc '
aptitude
-P
install
$@
' root"
print "$cmd"
print "$cmd"
...
@@ -136,7 +138,7 @@ apt_pref_compdef abd "build-dep"
...
@@ -136,7 +138,7 @@ apt_pref_compdef abd "build-dep"
apt_pref_compdef ac
"clean"
apt_pref_compdef ac
"clean"
apt_pref_compdef ad
"update"
apt_pref_compdef ad
"update"
apt_pref_compdef afu
"update"
apt_pref_compdef afu
"update"
apt_pref_compdef ag
"upgr
ade
"
apt_pref_compdef ag
"
$apt_
upgr
"
apt_pref_compdef ai
"install"
apt_pref_compdef ai
"install"
apt_pref_compdef ail
"install"
apt_pref_compdef ail
"install"
apt_pref_compdef ap
"purge"
apt_pref_compdef ap
"purge"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment