# HG changeset patch # User Alexis S. L. Carvalho # Date 1138360539 -3600 # Node ID 747c8d03bd2996df76f8e562f64c6037ff8e315b # Parent b8d792057e5b889ce46e91721a6b67b201eac6ff bash_completion: ignore hg help error messages They are usually not useful when you're completing stuff and end up cluttering the screen. diff -r b8d792057e5b -r 747c8d03bd29 contrib/bash_completion --- 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