# HG changeset patch # User Thomas Arendsen Hein # Date 2006-03-12 11:29:03 # Node ID 283d2ab1e020e9c81c8dcad24348c2c95ece1061 # Parent 913397c27cd875ae39ff3cb0bfd5a254b9fbfbd5 Make bash_completion more robust for e.g. broken hgrc or old hg installations. diff --git a/contrib/bash_completion b/contrib/bash_completion --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -15,7 +15,8 @@ shopt -s extglob _hg_commands() { - local commands="$("$hg" debugcomplete "$cur")" + local commands + commands="$("$hg" debugcomplete "$cur" 2>/dev/null)" || commands="" COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$commands' -- "$cur")) }