summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2018-09-07 11:58:53 -0400
committerAllan McRae <allan@archlinux.org>2018-10-21 19:33:57 +1000
commitea877c596bc380acd608468e4e38186ac0252197 (patch)
tree1454ae219e6616a570c9d5fff023d6d886200613 /scripts
parentc887d2cf00d7c2238edd1d317b8c887e774b6d3f (diff)
downloadpacman-ea877c596bc380acd608468e4e38186ac0252197.tar.xz
bash-completion: disable completions for pacman --search operations
We don't need exact package name completions for something that expects a regular expression *search*, which is what we currently do. If you want a package name completion for a search, you don't need the search. This change is consistent with the current state of zsh completions. Fixes FS#59965 Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/completion/bash_completion.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/completion/bash_completion.in b/scripts/completion/bash_completion.in
index 31b41f71..c3249cd0 100644
--- a/scripts/completion/bash_completion.in
+++ b/scripts/completion/bash_completion.in
@@ -141,12 +141,14 @@ _pacman() {
Q)
{ _arch_incomp 'g groups' && _pacman_pkg Qg sort; } ||
{ _arch_incomp 'p file' && _pacman_file; } ||
+ { _arch_incomp 's search' && compopt +o default; } ||
{ _arch_incomp 'u upgrades' && compopt +o default; } ||
_arch_incomp 'o owns' ||
_pacman_pkg Qq;;
S)
{ _arch_incomp 'g groups' && _pacman_pkg Sg; } ||
{ _arch_incomp 'l list' && _pacman_repo_list; } ||
+ { _arch_incomp 's search' && compopt +o default; } ||
_pacman_pkg Slq;;
U)
_pacman_file;;