FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 01-19-2012, 09:28 PM
Dan McGee
 
Default 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>
---
contrib/bash_completion.in | 4 ++--
contrib/zsh_completion.in | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/bash_completion.in b/contrib/bash_completion.in
index d9e0c78..8983c92 100644
--- a/contrib/bash_completion.in
+++ b/contrib/bash_completion.in
@@ -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
)"
}
diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in
index 59551c5..2cfc946 100644
--- a/contrib/zsh_completion.in
+++ b/contrib/zsh_completion.in
@@ -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
--
1.7.8.3
 

Thread Tools




All times are GMT. The time now is 01:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org