Added a fallback for paclist().

This commit is contained in:
jamesm-sitegen 2011-11-29 17:04:31 +11:00
commit 053982e0f0

View file

@ -1,7 +1,3 @@
# This isn't finished, but shows how the aur-helpers will/can be managed
# zstyle :omz:plugins:aur-helper aur_helper {cower,meat}
#zstyle -b :omz:plugins:aur-helper aur_helper _plugin__aur_helper
# Archlinux zsh aliases and functions # Archlinux zsh aliases and functions
# Usage is also described at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins # Usage is also described at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
@ -27,9 +23,8 @@ alias pacmir='sudo pacman -Syy' # Force refresh of all package li
# https://bbs.archlinux.org/viewtopic.php?id=93683 # https://bbs.archlinux.org/viewtopic.php?id=93683
paclist() { paclist() {
[[ -x $(which expac) ]] && expac "${fg[cyan]}%n${fg[green]}: ${reset_color}%d" || ( [[ -x $(which expac) ]] && expac "${fg[cyan]}%n${fg[green]}: ${reset_color}%d" || (
read -p "You don't have 'expac' installed, install? [y,N]" install_expac pacman -Qqei|awk 'BEGIN {FS=": "}/^Name/{printf("\033[36m%s\033[32m:\033[37m ", $2)}/^Description/{print $2}' && \
# fixme! echo "Please install expac! Awk used with pacman -Qqei; expac is faster!" >&2
echo "Sorry, this isn't yet implemented, please run 'pacman -S expac' manually! (fixme!)"
) )
} }