Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/completion/zsh_completion.in
diff options
context:
space:
mode:
authorAndrew Gregory <andrew.gregory.8@gmail.com>2018-01-13 11:50:00 -0500
committerAllan McRae <allan@archlinux.org>2018-01-19 12:02:11 +1000
commitd9eda13fc69eb0bfbbab6d7488e99e5c7b033d3a (patch)
tree681851b33b419c35171825f5eb5b5112cb4f8a43 /scripts/completion/zsh_completion.in
parent170bb80a1f8a020595738c7febdb15c68574ce29 (diff)
use pacman-conf in scripts
Because parsing pacman.conf is so difficult that even we can't do it right. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/completion/zsh_completion.in')
-rw-r--r--scripts/completion/zsh_completion.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/completion/zsh_completion.in b/scripts/completion/zsh_completion.in
index f74fa297..77449955 100644
--- a/scripts/completion/zsh_completion.in
+++ b/scripts/completion/zsh_completion.in
@@ -316,7 +316,7 @@ _pacman_completions_all_packages() {
typeset -U packages
${seq} _wanted packages expl "packages" compadd ${sep[@]} - "${(@)packages}"
- repositories=(${(o)${${${(M)${(f)"$(<@sysconfdir@/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
+ repositories=($(pacman-conf --repo-list))
typeset -U repositories
_wanted repo_packages expl "repository/package" compadd -S "/" $repositories
fi
@@ -348,7 +348,7 @@ _pacman_all_packages() {
# provides completions for repository names
_pacman_completions_repositories() {
local -a cmd repositories
- repositories=(${(o)${${${(M)${(f)"$(<@sysconfdir@/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
+ repositories=($(pacman-conf --repo-list))
# Uniq the array
typeset -U repositories
compadd "$@" -a repositories