mirror of
https://github.com/Jguer/yay
synced 2024-10-31 13:42:27 +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
1 changed files with 464 additions and 464 deletions
|
@ -398,7 +398,7 @@ _pacman_completions_all_packages() {
|
||||||
typeset -U packages
|
typeset -U packages
|
||||||
${seq} _wanted packages expl "packages" compadd ${sep[@]} - "${(@)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
|
typeset -U repositories
|
||||||
_wanted repo_packages expl "repository/package" compadd -S "/" $repositories
|
_wanted repo_packages expl "repository/package" compadd -S "/" $repositories
|
||||||
fi
|
fi
|
||||||
|
@ -430,7 +430,7 @@ _pacman_all_packages() {
|
||||||
# provides completions for repository names
|
# provides completions for repository names
|
||||||
_pacman_completions_repositories() {
|
_pacman_completions_repositories() {
|
||||||
local -a cmd repositories
|
local -a cmd repositories
|
||||||
repositories=(${(o)${${${(M)${(f)"$(</etc/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
repositories=($(pacman-conf --repo-list))
|
||||||
# Uniq the array
|
# Uniq the array
|
||||||
typeset -U repositories
|
typeset -U repositories
|
||||||
compadd "$@" -a repositories
|
compadd "$@" -a repositories
|
||||||
|
|
Loading…
Reference in a new issue