Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/scripts/completion
diff options
context:
space:
mode:
authorJoel Teichroeb <joel@teichroeb.net>2018-01-15 13:15:23 -0800
committerAllan McRae <allan@archlinux.org>2018-01-19 12:04:45 +1000
commitb2e088e42cfb5be2ed7247040a50acf92916d1c2 (patch)
treed6c1d990efc790200b4ff94db6cb47264adedeea /scripts/completion
parentd9eda13fc69eb0bfbbab6d7488e99e5c7b033d3a (diff)
use pacman-conf in bash completion
Signed-off-by: Joel Teichroeb <joel@teichroeb.net> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts/completion')
-rw-r--r--scripts/completion/bash_completion.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/completion/bash_completion.in b/scripts/completion/bash_completion.in
index 06963c42..9ef43238 100644
--- a/scripts/completion/bash_completion.in
+++ b/scripts/completion/bash_completion.in
@@ -96,6 +96,10 @@ _pacman_pkg() {
)"
}
+_pacman_repo_list() {
+ _arch_compgen "$(pacman-conf --repo-list)"
+}
+
_pacman() {
local common core cur database files prev query remove sync upgrade o
COMPREPLY=()
@@ -136,7 +140,7 @@ _pacman() {
_pacman_pkg Qq;;
S)
{ _arch_incomp 'g groups' && _pacman_pkg Sg; } ||
- { _arch_incomp 'l list' && _pacman_pkg Sl sort; } ||
+ { _arch_incomp 'l list' && _pacman_repo_list; } ||
_pacman_pkg Slq;;
U)
_pacman_file;;