summaryrefslogtreecommitdiffstats
path: root/scripts/completion
AgeCommit message (Collapse)AuthorFilesLines
2019-06-26bash-completion: use POSIX character classes in regular expressionsEli Schwartz1-3/+3
bash uses POSIX extended regular expressions via regex(3), which does not guarantee support for shorthand character classes. Although glibc supports it, msys2-runtime does not. Make sure the completion script works (hopefully) everywhere by being more portable. Fixes: https://github.com/msys2/MSYS2-packages/pull/1549 Original-patch-by: plotasse <platos@protonmail.ch> Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2019-03-25bash-completion: support file redirection completionsEli Schwartz1-9/+9
The current completions don't properly handle redirection operators, and attempt to complete command completions rather than completing filenames to redirect to. bash-completion provides both _get_comp_words_by_ref and a higher-level wrapper _init_completion, but the latter provides handling of redirection operators, so switch to using that. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-10-21bash-completion: disable completions for pacman --search operationsEli Schwartz1-0/+2
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>
2018-10-21bash-completion: don't complete filenames when they're not wantedEli Schwartz1-6/+12
Filename completion should only be generated for makepkg, when using the options -p or --config... which means we should offer option completions by default. Filename completion for pacman, should not be generated when using -Qu, or -F without -o. Signed-off-by: Eli Schwartz <eschwartz@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-08-10scripts: Remove trailing semicolonsJan Alexander Steffens (heftig)2-5/+5
Signed-off-by: Allan McRae <allan@archlinux.org>
2018-05-12bash_completion.in - consider option "-n --native" in operation "-Q --query"Simon Linden1-2/+2
Signed-off-by: Simon Linden <xhi2018@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-01-19use pacman-conf in bash completionJoel Teichroeb1-1/+5
Signed-off-by: Joel Teichroeb <joel@teichroeb.net> Signed-off-by: Allan McRae <allan@archlinux.org>
2018-01-19use pacman-conf in scriptsAndrew Gregory1-2/+2
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>
2016-10-10Move bash/zsh completion out of contribAllan McRae3-0/+881
Signed-off-by: Allan McRae <allan@archlinux.org>