1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-11-14 22:21:13 +00:00
prezto/modules/dpkg/init.zsh

58 lines
1.4 KiB
Bash
Raw Permalink Normal View History

2012-02-01 04:37:51 +00:00
#
# Defines dpkg aliases.
#
# Authors:
# Daniel Bolton <dbb@9y.com>
# Benjamin Boudreau <boudreau.benjamin@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
2012-07-23 19:00:44 +00:00
# Return if requirements are not found.
if (( ! $+commands[dpkg] && ! $+commands[apt-get] )); then
return 1
fi
2012-08-04 18:48:32 +00:00
#
2011-08-31 03:16:15 +00:00
# Aliases
2012-08-04 18:48:32 +00:00
#
2012-07-03 18:05:10 +00:00
# Cleans the cache.
alias debc='sudo apt-get clean && sudo apt-get autoclean'
# Displays a file's package.
2012-07-03 18:05:10 +00:00
alias debf='apt-file search --regexp'
# Installs packages from repositories.
alias debi='sudo apt-get install'
# Installs packages from files.
alias debI='sudo dpkg -i'
# Displays package information.
alias debq='apt-cache show'
# Updates the package lists.
2012-07-03 18:05:10 +00:00
alias debu='sudo apt-get update'
# Upgrades outdated packages.
alias debU='sudo apt-get update && sudo apt-get dist-upgrade'
# Removes packages.
alias debx='sudo apt-get remove'
# Removes packages, their configuration, and unneeded dependencies.
alias debX='sudo apt-get remove --purge && sudo apt-get autoremove --purge'
# Searches for packages.
if (( $+commands[aptitude] )); then
alias debs='aptitude -F "* %p -> %d \n(%v/%V)" --no-gui --disable-columns search'
else
alias debs='apt-cache search'
fi
2011-08-31 03:16:15 +00:00
# Creates a basic deb package.
2012-07-03 18:05:10 +00:00
alias deb-build='time dpkg-buildpackage -rfakeroot -us -uc'
2011-08-31 03:16:15 +00:00
2012-07-03 18:05:10 +00:00
# Removes all kernel images and headers, except for the ones in use.
alias deb-kclean='sudo aptitude remove -P "?and(~i~nlinux-(ima|hea) ?not(~n$(uname -r)))"'