diff -r e3280d350792 -r 5e7aff1b6ae1 contrib/bash_completion --- a/contrib/bash_completion Sat Apr 01 21:37:08 2006 +0200 +++ b/contrib/bash_completion Sat Apr 01 22:50:12 2006 +0200 @@ -1,18 +1,5 @@ shopt -s extglob -_hg_option_list() -{ - "$hg" -v help $1 2>/dev/null | \ - awk '/^ *-/ { - for (i = 1; i <= NF; i ++) { - if (index($i, "-") != 1) - break; - print $i; - } - }' -} - - _hg_commands() { local commands @@ -89,7 +76,7 @@ done if [[ "$cur" == -* ]]; then - opts=$(_hg_option_list $cmd) + opts=$("$hg" debugcomplete --options "$cmd" 2>/dev/null) COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$opts' -- "$cur")) return