1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 17:28:01 +00:00

pacman: Simplify support for AUR helpers

There are a number of things happening here.

- Extra support for yaourt has been removed
- Docs have been updated to explicitly call out that AUR helpers are not
  officially supported
- aurutils has been suggested to make common operations easier
- A utility function called aurget (similar to aurfetch from aurutils)
  has been added to make cloning AUR repos easier.

Fixes #1531
This commit is contained in:
Kaleb Elwert 2018-01-24 13:47:20 -08:00
parent 73e94b84bb
commit e32a96be72
3 changed files with 25 additions and 47 deletions

View File

@ -8,23 +8,20 @@ Settings
-------- --------
It is possible to use a Pacman frontend with the pacman aliases provided by this It is possible to use a Pacman frontend with the pacman aliases provided by this
package as long as that frontend supports the same command line options (Such as package as long as that frontend supports the same command line options (The
[Pacaur][2] or [Yaourt][3]). [AUR Helpers][2] page has a good comparison which lists if the command line
options are pacman compatible).
To enable a Pacman frontend, for example, [Pacaur][2], add the following line to Please note that installing packages with an AUR Helper is not officially
*zpreztorc*: supported by Archlinux. It is currently recommended to manually build AUR
packages using the [provided instructions][3]. The [aurtools][4] project has a
set of small utilities to make this easier.
To enable a Pacman frontend, add the following line to *zpreztorc*, substituting
`pacman_frontend` with the name of the frontent:
```sh ```sh
zstyle ':prezto:module:pacman' frontend 'pacaur' zstyle ':prezto:module:pacman' frontend 'pacman_frontend'
```
If you have enabled color globally in *zpreztorc*, you may disable it for certain
commands.
To disable `yaourt` highlighting, add the following line to *zpreztorc*:
```sh
zstyle ':prezto:module:pacman:yaourt' color 'no'
``` ```
Aliases Aliases
@ -50,28 +47,23 @@ Aliases
### Frontends ### Frontends
#### Yaourt
Note that there are currently potential security concerns relating to yaourt, so
other frontends are recommended.
- `pacc` manages *.pac\** files.
Functions Functions
--------- ---------
- `aurget` clone an aur package
- `pacman-list-explicit` lists explicitly installed pacman packages. - `pacman-list-explicit` lists explicitly installed pacman packages.
- `pacman-list-disowned` lists pacman disowned files. - `pacman-list-disowned` lists pacman disowned files.
Authors Authors
------- -------
*The authors of this module should be contacted via the [issue tracker][4].* *The authors of this module should be contacted via the [issue tracker][5].*
- [Benjamin Boudreau](https://github.com/dreur) - [Benjamin Boudreau](https://github.com/dreur)
- [Sorin Ionescu](https://github.com/sorin-ionescu) - [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://www.archlinux.org/pacman/ [1]: http://www.archlinux.org/pacman/
[2]: https://github.com/rmarquis/pacaur [2]: https://wiki.archlinux.org/index.php/AUR_helpers#Comparison_table
[3]: http://archlinux.fr/yaourt-en [3]: https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages
[4]: https://github.com/sorin-ionescu/prezto/issues [4]: https://github.com/AladW/aurutils
[5]: https://github.com/sorin-ionescu/prezto/issues

View File

@ -23,10 +23,6 @@ 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"
if [[ -s "${0:h}/${_pacman_frontend}.zsh" ]]; then
source "${0:h}/${_pacman_frontend}.zsh"
fi
else else
_pacman_frontend='pacman' _pacman_frontend='pacman'
_pacman_sudo='sudo ' _pacman_sudo='sudo '
@ -81,4 +77,12 @@ fi
# upgrades outdated packages. # upgrades outdated packages.
alias pacU="${_pacman_sudo}${_pacman_frontend} --sync --refresh --sysupgrade" alias pacU="${_pacman_sudo}${_pacman_frontend} --sync --refresh --sysupgrade"
function aurget {
local target_dir="$1"
if [[ -n "$2" ]]; then
target_dir="$2"
fi
git clone "https://aur.archlinux.org/$1" "$target_dir"
}
unset _pacman_{frontend,sudo} unset _pacman_{frontend,sudo}

View File

@ -1,18 +0,0 @@
#
# Defines Yaourt aliases.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
#
# Aliases
#
# Disable color.
if ! zstyle -t ':prezto:module:pacman:yaourt' color; then
alias pacman='yaourt --nocolor'
fi
# Manages .pac* files.
alias pacc='yaourt -C'