# HG changeset patch # User Alexis S. L. Carvalho # Date 1125340627 -7200 # Node ID f82b084bd904b46ce06248852dd3be09ff2f5360 # Parent fad2d091c74f06c33125376a3fdcd2ec2ccf6776 bash_completion: update for new help output format diff -r fad2d091c74f -r f82b084bd904 contrib/bash_completion --- a/contrib/bash_completion Mon Aug 29 11:28:48 2005 -0700 +++ b/contrib/bash_completion Mon Aug 29 20:37:07 2005 +0200 @@ -73,11 +73,8 @@ done if [[ "$cur" == -* ]]; then - opts="$(hg -v help | sed -e '1,/^global options/d; /^ -/!d')" - - if [ -n "$cmd" ]; then - opts="$opts $(hg help "$cmd" | sed -e '/^ -/!d; s/ [^-][^ ]*//')" - fi + # this assumes that there are no commands with spaces in the name + opts=$(hg -v help $cmd | sed -e '/^ *-/!d; s/ [^- ].*//') COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$opts" -- "$cur") ) return