##// END OF EJS Templates
bash_completion: update for new help output format
Alexis S. L. Carvalho -
r1149:f82b084b default
parent child Browse files
Show More
@@ -73,11 +73,8 b''
73 done
73 done
74
74
75 if [[ "$cur" == -* ]]; then
75 if [[ "$cur" == -* ]]; then
76 opts="$(hg -v help | sed -e '1,/^global options/d; /^ -/!d')"
76 # this assumes that there are no commands with spaces in the name
77
77 opts=$(hg -v help $cmd | sed -e '/^ *-/!d; s/ [^- ].*//')
78 if [ -n "$cmd" ]; then
79 opts="$opts $(hg help "$cmd" | sed -e '/^ -/!d; s/ [^-][^ ]*//')"
80 fi
81
78
82 COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$opts" -- "$cur") )
79 COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$opts" -- "$cur") )
83 return
80 return
General Comments 0
You need to be logged in to leave comments. Login now