mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
contrib/bash_completion: don't print stderr messages
If you are a crazy developer like me and have bogus options in your pacman.conf file, the tab completion gets messed up by the output on stderr. Suppress it. Fix the same basic issue in zsh_completion, thanks to the work by Florian Pritz <bluewind@xinu.at>. Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
1eb40c8328
commit
de56874cc9
@ -59,9 +59,9 @@ _makepkg() {
|
||||
_pacman_pkg() {
|
||||
_arch_compgen "$(
|
||||
if [[ $2 ]]; then
|
||||
\pacman -$1 | \cut -d' ' -f1 | \sort -u
|
||||
\pacman -$1 2>/dev/null | \cut -d' ' -f1 | \sort -u
|
||||
else
|
||||
\pacman -$1
|
||||
\pacman -$1 2>/dev/null
|
||||
fi
|
||||
)"
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ _pacman_completions_repositories() {
|
||||
# $cmd must be declared by calling function
|
||||
_pacman_get_command() {
|
||||
# this is mostly nicked from _perforce
|
||||
cmd=( "pacman" )
|
||||
cmd=( "pacman" "2>/dev/null")
|
||||
integer i
|
||||
for (( i = 2; i < CURRENT - 1; i++ )); do
|
||||
if [[ ${words[i]} = "--config" || ${words[i]} = "--root" ]]; then
|
||||
|
Loading…
Reference in New Issue
Block a user