mirror of
https://github.com/Jguer/yay
synced 2024-08-31 13:49:28 +00:00
Use tabs and use pacman-conf over config parsing
This makes our zsh completion more similar to pacmans. Making it easier to view diffs between the two.
This commit is contained in:
parent
127c5e7cb9
commit
5996e28e32
|
@ -398,7 +398,7 @@ _pacman_completions_all_packages() {
|
|||
typeset -U packages
|
||||
${seq} _wanted packages expl "packages" compadd ${sep[@]} - "${(@)packages}"
|
||||
|
||||
repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||
repositories=($(pacman-conf --repo-list))
|
||||
typeset -U repositories
|
||||
_wanted repo_packages expl "repository/package" compadd -S "/" $repositories
|
||||
fi
|
||||
|
@ -430,7 +430,7 @@ _pacman_all_packages() {
|
|||
# provides completions for repository names
|
||||
_pacman_completions_repositories() {
|
||||
local -a cmd repositories
|
||||
repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||
repositories=($(pacman-conf --repo-list))
|
||||
# Uniq the array
|
||||
typeset -U repositories
|
||||
compadd "$@" -a repositories
|
||||
|
|
Loading…
Reference in a new issue