1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 09:19:25 +00:00

Compare commits

...

4 Commits

Author SHA1 Message Date
a97e8de21b Do not use sudo when listing orphaned packages with pacman 2014-01-25 17:31:36 -06:00
725e7720de Improve the output of 'pacman-list-explicit'
Package names are bold, and the package version is also shown, in bold
green.

Fix awk's field separator which used to truncate any version or package
description containing a colon.
2014-01-25 16:36:49 -06:00
af003d83c5 [Fix #535] Set Pacman frontend to 'pacman' when none set 2014-01-21 22:12:09 -05:00
839f4a7b83 Fix setting the 'pac' alias 2014-01-13 21:35:38 -05:00
2 changed files with 8 additions and 4 deletions

View File

@ -9,10 +9,13 @@
pacman --query --explicit --info \
| awk '
BEGIN {
FS=":"
FS=" : "
}
/^Name/ {
print $2
printf "\033[0;01m" $2 "\033[0m"
}
/^Version/ {
print " \033[1;32m" $2 "\033[0m"
}
/^Description/ {
print $2

View File

@ -28,6 +28,7 @@ if (( $+commands[$_pacman_frontend] )); then
source "${0:h}/${_pacman_frontend}.zsh"
fi
else
_pacman_frontend='pacman'
_pacman_sudo='sudo '
fi
@ -36,7 +37,7 @@ fi
#
# Pacman.
alias pac= "${_pacman_frontend}"
alias pac="${_pacman_frontend}"
# Installs packages from repositories.
alias paci="${_pacman_sudo}${_pacman_frontend} --sync"
@ -63,7 +64,7 @@ alias pacs="${_pacman_frontend} --sync --search"
alias pacS="${_pacman_frontend} --query --search"
# Lists orphan packages.
alias pacman-list-orphans="${_pacman_sudo}${_pacman_frontend} --query --deps --unrequired"
alias pacman-list-orphans="${_pacman_frontend} --query --deps --unrequired"
# Removes orphan packages.
alias pacman-remove-orphans="${_pacman_sudo}${_pacman_frontend} --remove --recursive \$(${_pacman_frontend} --quiet --query --deps --unrequired)"