From 534e627331976a9ebf106f35ad048a8763680398 Mon Sep 17 00:00:00 2001 From: Matt Hamilton Date: Tue, 29 Dec 2015 14:14:13 -0500 Subject: [PATCH] cleanup pacman module and options --- modules/pacman/init.zsh | 25 +++++++------------------ templates/zimrc | 2 +- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/modules/pacman/init.zsh b/modules/pacman/init.zsh index b306240..6b6a7a3 100644 --- a/modules/pacman/init.zsh +++ b/modules/pacman/init.zsh @@ -14,22 +14,11 @@ if (( ! ${+commands[pacman]} )); then return 1 fi -# find if there is a pacman wrapper available (and not set in .zimrc) -if [[ ${zpacman_frontend} == 'auto' ]]; then - # no frontend set in config; test for common frontends. - - if (( ${+commands[powerpill]} )); then - zpacman_frontend='powerpill' - elif (( ${+commands[pacmatic]} )); then - zpacman_frontend='pacmatic' - else - zpacman_frontend='pacman' - fi -elif (( ! ${+zpacman_frontend} )); then +if (( ! ${+zpacman_frontend} )); then zpacman_frontend='pacman' elif (( ! ${+commands[${zpacman_frontend}]} )); then - print "pacman frontend \"${zpacman_frontend}\" is invalid or not installed. Reverting to \"pacman\"." >&2 - print "you can fix this error by editing the 'zpacman_frontend' variable in your .zimrc" >&2 + print "pacman frontend \"${zpacman_frontend}\" is invalid or not installed. Reverting to \"pacman\". +you can fix this error by editing the 'zpacman_frontend' variable in your .zimrc" >&2 zpacman_frontend='pacman' fi @@ -53,16 +42,16 @@ alias pacb='makepkg -sci' #NOTE: Installing/upgrading individual packages is NOT supported. Sync and upgrade ALL on install. # install, sync, and upgrade packages -alias paci='sudo ${zpacman_frontend} -Syu' +alias paci="sudo ${zpacman_frontend} -Syu" # install, sync, and upgrade packages (forcibly refresh package lists) -alias pacu='sudo ${zpacman_frontend} -Syyu' +alias pacu="sudo ${zpacman_frontend} -Syyu" # install packages by filename -alias pacU='sudo ${zpacman_frontend} -U' +alias pacU="sudo ${zpacman_frontend} -U" # install all packages in current directory -alias pacd='sudo ${zpacman_frontend} -U *.pkg.tar.xz' +alias pacd="sudo ${zpacman_frontend} -U *.pkg.tar.xz" # diff --git a/templates/zimrc b/templates/zimrc index 6cd807e..32bd8c8 100644 --- a/templates/zimrc +++ b/templates/zimrc @@ -48,7 +48,7 @@ zssh_ids=(id_rsa) # Pacman # -# set (optional) pacman front-end. If not set, zim will attempt to use powerpill or pacmatic if available +# set (optional) pacman front-end. #zpacman_frontend='powerpill' # load any helper scripts as difined here