equal
deleted
inserted
replaced
71 break |
71 break |
72 fi |
72 fi |
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 |
84 fi |
81 fi |
85 |
82 |