From 38f8fe109faf6c56dc0ddbe4082a6815cf0c592f Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Mon, 2 Nov 2015 04:52:19 -0500 Subject: [PATCH] Minor changes to the pacman module swap pacU for pacu. No reason to have caps for the common one, and lowercase for the uncommon one. add pacd to install all packages in the current directory. For those not using an AUR helper and building from PKGBUILDs themselves, this is a common command. installing packages without --sysupgrade is not supported; fix. --- modules/pacman/README.md | 5 +++-- modules/pacman/init.zsh | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/modules/pacman/README.md b/modules/pacman/README.md index fb07407d..c7d28232 100644 --- a/modules/pacman/README.md +++ b/modules/pacman/README.md @@ -27,15 +27,16 @@ Aliases - `pac` is short for `pacman`. - `paci` installs packages from repositories. - `pacI` installs packages from files. + - `pacd` installs all packages in the current directory. - `pacx` removes packages and unneeded dependencies. - `pacX` removes packages, their configuration, and unneeded dependencies. - `pacq` displays information about a package from the repositories. - `pacQ` displays information about a package from the local database. - `pacs` searches for packages in the repositories. - `pacS` searches for packages in the local database. - - `pacu` synchronizes the local package and Arch Build System (requires `abs`) + - `pacU` synchronizes the local package and Arch Build System (requires `abs`) databases against the repositories. - - `pacU` synchronizes the local package database against the repositories then + - `pacu` synchronizes the local package database against the repositories then upgrades outdated packages. - `pacman-list-orphans` lists orphan packages. - `pacman-remove-orphans` removes orphan packages. diff --git a/modules/pacman/init.zsh b/modules/pacman/init.zsh index 9d752a9b..814630ba 100644 --- a/modules/pacman/init.zsh +++ b/modules/pacman/init.zsh @@ -4,6 +4,7 @@ # Authors: # Benjamin Boudreau # Sorin Ionescu +# Matt Hamilton # # Tips: # https://wiki.archlinux.org/index.php/Pacman_Tips @@ -32,6 +33,9 @@ else _pacman_sudo='sudo ' fi +# Set package compression and type +_pacman_package_ext='.pkg.tar.xz' + # # Aliases # @@ -40,11 +44,14 @@ fi alias pac="${_pacman_frontend}" # Installs packages from repositories. -alias paci="${_pacman_sudo}${_pacman_frontend} --sync" +alias paci="${_pacman_sudo}${_pacman_frontend} --sync --sysupgrade" # Installs packages from files. alias pacI="${_pacman_sudo}${_pacman_frontend} --upgrade" +# Installs all packages in local directory +alias pacd="${_pacman_sudo}${_pacman_frontend} --upgrade *${_pacman_package_ext}" + # Removes packages and unneeded dependencies. alias pacx="${_pacman_sudo}${_pacman_frontend} --remove" @@ -72,13 +79,13 @@ alias pacman-remove-orphans="${_pacman_sudo}${_pacman_frontend} --remove --recur # Synchronizes the local package and Arch Build System databases against the # repositories. if (( $+commands[abs] )); then - alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh && sudo abs" + alias pacU="${_pacman_sudo}${_pacman_frontend} --sync --refresh && sudo abs" else - alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh" + alias pacU="${_pacman_sudo}${_pacman_frontend} --sync --refresh" fi # Synchronizes the local package database against the repositories then # upgrades outdated packages. -alias pacU="${_pacman_sudo}${_pacman_frontend} --sync --refresh --sysupgrade" +alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh --sysupgrade" -unset _pacman_{frontend,sudo} +unset _pacman_{frontend,sudo,package_ext}