--- a/contrib/bash_completion Fri Jan 27 12:11:14 2006 +0100
+++ b/contrib/bash_completion Fri Jan 27 12:15:39 2006 +0100
@@ -56,7 +56,7 @@
_hg_paths()
{
- local paths="$(hg paths | sed -e 's/ = .*$//')"
+ local paths="$(hg paths 2> /dev/null | sed -e 's/ = .*$//')"
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -W '$paths' -- "$cur" ))
}
@@ -70,13 +70,14 @@
_hg_status()
{
- local files="$( hg status -n$1 . )"
+ local files="$( hg status -n$1 . 2> /dev/null)"
COMPREPLY=(${COMPREPLY[@]:-} $( compgen -W '$files' -- "$cur" ))
}
_hg_tags()
{
- local tags="$(hg tags | sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//')"
+ local tags="$(hg tags 2> /dev/null |
+ sed -e 's/[0-9]*:[a-f0-9]\{40\}$//; s/ *$//')"
COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W '$tags' -- "$cur") )
}
@@ -145,7 +146,7 @@
fi
# canonicalize command name
- cmd=$(hg -q help "$cmd" | sed -e 's/^hg //; s/ .*//; 1q')
+ cmd=$(hg -q help "$cmd" 2> /dev/null | sed -e 's/^hg //; s/ .*//; 1q')
if [ "$cmd" != status ] && [ "$prev" = -r ] || [ "$prev" = --rev ]; then
_hg_tags