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
Ohmyzsh
Commits
749feb27
Commit
749feb27
authored
Aug 06, 2011
by
Daniel Bolton
Browse files
Merge "deb" and "debian" plugins.
parent
a738ca9b
Changes
2
Show whitespace changes
Inline
Side-by-side
plugins/deb/deb.plugin.zsh
deleted
100644 → 0
View file @
a738ca9b
# Aliases
alias
as
=
"aptitude -F
\"
* %p -> %d
\n
(%v/%V)
\"
\
--no-gui --disable-columns search"
# search package
alias
ad
=
"sudo apt-get update"
# update packages lists
alias
au
=
"sudo apt-get update &&
\
sudo apt-get dselect-upgrade"
# upgrade packages
alias
ai
=
"sudo apt-get install"
# install package
alias
ar
=
"sudo apt-get remove --purge &&
\
sudo apt-get autoremove --purge"
# remove package
alias
ap
=
"apt-cache policy"
# apt policy
alias
av
=
"apt-cache show"
# show package info
alias
acs
=
"apt-cache search"
# search package
alias
ac
=
"sudo apt-get clean && sudo apt-get autoclean"
# clean apt cache
plugins/debian/debian.plugin.zsh
View file @
749feb27
# https://github.com/dbb
olton
/
# https://github.com/dbb/
#
# Debian-related zsh aliases and functions for zsh
...
...
@@ -6,14 +6,29 @@
# Aliases ###################################################################
# Some self-explanatory aliases
alias
acs
=
"apt-cache search"
alias
afs
=
'apt-file search --regexp'
alias
aps
=
'aptitude search'
alias
as
=
"aptitude -F
\"
* %p -> %d
\n
(%v/%V)
\"
\
--no-gui --disable-columns search"
# search package
alias
apsrc
=
'apt-get source'
alias
apv
=
'apt-cache policy'
# aliases that use su -c ##############
alias
apdg
=
'su -c "aptitude update && aptitude safe-upgrade"'
alias
apud
=
'su -c "aptitude update"'
alias
apug
=
'su -c "aptitude safe-upgrade"'
# end aliases that use su -c ##########
# aliases that use sudo ###############
alias
ad
=
"sudo apt-get update"
# update packages lists
alias
au
=
"sudo apt-get update &&
\
sudo apt-get dselect-upgrade"
# upgrade packages
alias
ai
=
"sudo apt-get install"
# install package
alias
ar
=
"sudo apt-get remove --purge &&
\
sudo apt-get autoremove --purge"
# remove package
alias
ac
=
"sudo apt-get clean && sudo apt-get autoclean"
# clean apt cache
# end aliases that use sudo ###########
# print all installed packages
alias
allpkgs
=
'aptitude search -F "%p" --disable-columns ~i'
...
...
@@ -33,6 +48,13 @@ alias kclean='su -c '\''aptitude remove -P ?and(~i~nlinux-(ima|hea) ?not(~n`unam
# Functions #################################################################
# install packages without sudo
apin
()
{
cmd
=
"su -lc 'aptitude -P install
$@
' root"
print
"
$cmd
"
eval
"
$cmd
"
}
# create a simple script that can be used to 'duplicate' a system
apt-copy
()
{
print
'#!/bin/sh'
"
\n
"
>
apt-copy.sh
...
...
@@ -46,8 +68,10 @@ apt-copy() {
# Kernel-package building shortcut
dbb-build
()
{
MAKEFLAGS
=
''
# temporarily unset MAKEFLAGS ( '-j3' will fail )
kerndeb
()
{
# temporarily unset MAKEFLAGS ( '-j3' will fail )
MAKEFLAGS
=
$(
print -
$MAKEFLAGS
| perl
-pe
's/-j\s*[\d]+//g'
)
print
'$MAKEFLAGS set to '
"'
$MAKEFLAGS
'"
appendage
=
'-custom'
# this shows up in $ (uname -r )
revision
=
$(
date
+
"%Y%m%d"
)
# this shows up in the .deb file name
...
...
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