From 725e7720dee34dc904eea9f2646d9bc0bbfcf9ab Mon Sep 17 00:00:00 2001 From: OmeGa Date: Sat, 25 Jan 2014 16:36:49 -0600 Subject: [PATCH 1/2] 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. --- modules/pacman/functions/pacman-list-explicit | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/modules/pacman/functions/pacman-list-explicit b/modules/pacman/functions/pacman-list-explicit index 7359bfed..78dd7b6e 100644 --- a/modules/pacman/functions/pacman-list-explicit +++ b/modules/pacman/functions/pacman-list-explicit @@ -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 From a97e8de21b162335fc33c119e2cbd903fee429b7 Mon Sep 17 00:00:00 2001 From: OmeGa Date: Sat, 25 Jan 2014 17:31:36 -0600 Subject: [PATCH 2/2] Do not use sudo when listing orphaned packages with pacman --- modules/pacman/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/pacman/init.zsh b/modules/pacman/init.zsh index 2b4f0a22..e3cc179d 100644 --- a/modules/pacman/init.zsh +++ b/modules/pacman/init.zsh @@ -64,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)"