mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-23 02:18:00 +00:00
Refactor Pacman aliases
This commit is contained in:
parent
d54211832a
commit
fc06e0b125
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Defines pacman aliases.
|
# Defines Pacman aliases.
|
||||||
#
|
#
|
||||||
# Authors:
|
# Authors:
|
||||||
# Benjamin Boudreau <dreurmail@gmail.com>
|
# Benjamin Boudreau <dreurmail@gmail.com>
|
||||||
@ -9,102 +9,58 @@
|
|||||||
# https://wiki.archlinux.org/index.php/Pacman_Tips
|
# https://wiki.archlinux.org/index.php/Pacman_Tips
|
||||||
#
|
#
|
||||||
|
|
||||||
# Yaourt Aliases
|
# Get the Pacman frontend.
|
||||||
if (( $+commands[yaourt] )); then
|
zstyle -s ':omz:module:pacman' frontend '_pacman_frontend'
|
||||||
# Upgrade Arch Linux.
|
|
||||||
alias arch-upgrade='yaourt -Syu'
|
|
||||||
|
|
||||||
# Fix all configuration files with vimdiff.
|
if (( $+commands[$_pacman_frontend] )); then
|
||||||
alias yaconf='yaourt -C'
|
alias pacman="$_pacman_frontend"
|
||||||
|
|
||||||
# Synchronize with repositories before upgrading packages that are out of date on the local system.
|
if [[ -s "${0:h}/${_pacman_frontend}.zsh" ]]; then
|
||||||
alias yaupg='yaourt -Syu'
|
source "${0:h}/${_pacman_frontend}.zsh"
|
||||||
|
|
||||||
# Install specific package(s) from the repositories.
|
|
||||||
alias yain='yaourt -S'
|
|
||||||
|
|
||||||
# Install specific package(s) not from the repositories but from a file .
|
|
||||||
alias yains='yaourt -U'
|
|
||||||
|
|
||||||
# Remove the specified package(s), retaining its configuration(s) and required dependencies.
|
|
||||||
alias yare='yaourt -R'
|
|
||||||
|
|
||||||
# Remove the specified package(s), its configuration(s) and unneeded dependencies.
|
|
||||||
alias yarem='yaourt -Rns'
|
|
||||||
|
|
||||||
# Display information about a given package in the repositories.
|
|
||||||
alias yarep='yaourt -Si'
|
|
||||||
|
|
||||||
# Search for package(s) in the repositories.
|
|
||||||
alias yareps='yaourt -Ss'
|
|
||||||
|
|
||||||
# Display information about a given package in the local database.
|
|
||||||
alias yaloc='yaourt -Qi'
|
|
||||||
|
|
||||||
# Search for package(s) in the local database.
|
|
||||||
alias yalocs='yaourt -Qs'
|
|
||||||
|
|
||||||
# Force refresh of all package lists after updating /etc/pacman.d/mirrorlist
|
|
||||||
alias yamir='yaourt -Syy'
|
|
||||||
|
|
||||||
# Install given package(s) as dependencies of another package
|
|
||||||
alias yainsd='yaourt -S --asdeps'
|
|
||||||
|
|
||||||
# Update and refresh the local package and ABS databases against repositories.
|
|
||||||
if (( $+commands[abs] )); then
|
|
||||||
alias yaupd='yaourt -Sy && sudo abs'
|
|
||||||
else
|
|
||||||
alias yaupd='yaourt -Sy'
|
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
# Upgrade Arch Linux.
|
|
||||||
alias arch-upgrade='sudo pacman -Syu'
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Pacman Aliases
|
# Installs packages from repositories.
|
||||||
# Synchronize with repositories before upgrading packages that are out of date on the local system.
|
alias paci='sudo pacman --sync'
|
||||||
alias pacupg='sudo pacman -Syu'
|
|
||||||
|
|
||||||
# Install specific package(s) from the repositories.
|
# Installs packages from files.
|
||||||
alias pacin='sudo pacman -S'
|
alias pacI='sudo pacman --upgrade'
|
||||||
|
|
||||||
# Install specific package not from the repositories but from a file.
|
# Removes packages and unneeded dependencies.
|
||||||
alias pacins='sudo pacman -U'
|
alias pacx='sudo pacman --remove'
|
||||||
|
|
||||||
# Remove the specified package(s), retaining its configuration(s) and required dependencies.
|
# Removes packages, their configuration, and unneeded dependencies.
|
||||||
alias pacre='sudo pacman -R'
|
alias pacX='sudo pacman --remove --nosave --recursive'
|
||||||
|
|
||||||
# Remove the specified package(s), its configuration(s) and unneeded dependencies.
|
# Displays information about a given package in the repositories.
|
||||||
alias pacrem='sudo pacman -Rns'
|
alias pacq='pacman --sync --info'
|
||||||
|
|
||||||
# Display information about a given package in the repositories.
|
# Displays information about a given package in the local database.
|
||||||
alias pacrep='pacman -Si'
|
alias pacQ='pacman --query --info'
|
||||||
|
|
||||||
# Search for package(s) in the repositories.
|
# Searches for packages in the repositories.
|
||||||
alias pacreps='pacman -Ss'
|
alias pacs='pacman --sync --recursive'
|
||||||
|
|
||||||
# Display information about a given package in the local database.
|
# Searches for packages in the local database.
|
||||||
alias pacloc='pacman -Qi'
|
alias pacS='pacman --query --recursive'
|
||||||
|
|
||||||
# Search for package(s) in the local database.
|
# Lists orphan packages.
|
||||||
alias paclocs='pacman -Qs'
|
alias pacman-list-orphans='sudo pacman --query --deps --unrequired'
|
||||||
|
|
||||||
# Install given package(s) as dependencies of another package.
|
# Removes orphan packages.
|
||||||
alias pacinsd='sudo pacman -S --asdeps'
|
alias pacman-remove-orphans='sudo pacman --remove --recursive $(pacman --quiet --query --deps --unrequired)'
|
||||||
|
|
||||||
# Force refresh of all package lists after updating /etc/pacman.d/mirrorlist.
|
# Synchronizes the local package and Arch Build System databases against the
|
||||||
alias pacmir='sudo pacman -Syy'
|
# repositories.
|
||||||
|
|
||||||
# List orphan packages(s).
|
|
||||||
alias paclsorphans='sudo pacman -Qdt'
|
|
||||||
|
|
||||||
# Remove orphan package(s).
|
|
||||||
alias pacrmorphans='sudo pacman -Rs $(pacman -Qtdq)'
|
|
||||||
|
|
||||||
# Update and refresh the local package and ABS databases against repositories.
|
|
||||||
if (( $+commands[abs] )); then
|
if (( $+commands[abs] )); then
|
||||||
alias pacupd='sudo pacman -Sy && sudo abs'
|
alias pacu='sudo pacman --sync --refresh && sudo abs'
|
||||||
else
|
else
|
||||||
alias pacupd='sudo pacman -Sy'
|
alias pacu='sudo pacman --sync --refresh'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Synchronizes the local package database against the repositories then
|
||||||
|
# upgrades outdated packages.
|
||||||
|
alias pacU='sudo pacman --sync --refresh --sysupgrade'
|
||||||
|
|
||||||
|
unset _pacman_frontend
|
||||||
|
|
||||||
|
15
modules/pacman/yaourt.zsh
Normal file
15
modules/pacman/yaourt.zsh
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#
|
||||||
|
# Defines Yaourt aliases.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
#
|
||||||
|
|
||||||
|
# Disable color.
|
||||||
|
if ! zstyle -t ':omz:module:pacman:yaourt' color; then
|
||||||
|
alias pacman='pacman --nocolor'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Manages .pac* files.
|
||||||
|
alias pacc='pacman -C'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user