1
0
Fork 0

bugfix: using abs with yaourt

When selecting Yaourt as pacman frontend, the alias pacu would not run abs as sudo so it wouldn't get the correct permissions to update.
pull/652/head
Celso Miranda 10 years ago
parent bf9dbfd5b9
commit 1caddb1916

@ -23,9 +23,11 @@ zstyle -s ':prezto:module:pacman' frontend '_pacman_frontend'
if (( $+commands[$_pacman_frontend] )); then if (( $+commands[$_pacman_frontend] )); then
alias pacman="$_pacman_frontend" alias pacman="$_pacman_frontend"
_abs_sudo='sudo '
if [[ -s "${0:h}/${_pacman_frontend}.zsh" ]]; then if [[ -s "${0:h}/${_pacman_frontend}.zsh" ]]; then
source "${0:h}/${_pacman_frontend}.zsh" source "${0:h}/${_pacman_frontend}.zsh"
_abs_sudo='sudo '
fi fi
else else
_pacman_frontend='pacman' _pacman_frontend='pacman'
@ -72,7 +74,7 @@ alias pacman-remove-orphans="${_pacman_sudo}${_pacman_frontend} --remove --recur
# Synchronizes the local package and Arch Build System databases against the # Synchronizes the local package and Arch Build System databases against the
# repositories. # repositories.
if (( $+commands[abs] )); then if (( $+commands[abs] )); then
alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh && ${_pacman_sudo}abs" alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh && ${_abs_sudo}abs"
else else
alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh" alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh"
fi fi

Loading…
Cancel
Save