[pacman-dev] [PATCH 2/2] bash-completion: disable completions for pacman --search operations
Eli Schwartz
eschwartz at archlinux.org
Fri Sep 7 15:58:53 UTC 2018
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 at archlinux.org>
---
scripts/completion/bash_completion.in | 2 ++
1 file changed, 2 insertions(+)
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;;
--
2.18.0
More information about the pacman-dev
mailing list