diff --git a/contrib/bash_completion b/contrib/bash_completion --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -28,7 +28,7 @@ # cat ~/.patchbomb-$1 # fi # } -# +# # # Writing completion functions for additional commands: # @@ -50,7 +50,7 @@ # an argument (e.g. '--cwd|-R|--repository') # - $canonical - 1 if we canonicalized $cmd before calling the function # 0 otherwise -# +# shopt -s extglob @@ -425,7 +425,7 @@ complete -o bashdefault -o default -F _h done if [ -z "$subcmd" ] || [ $COMP_CWORD -eq $i ] || [ "$subcmd" = help ]; then - COMPREPLY=(${COMPREPLY[@]:-} + COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W 'bad good help init next reset' -- "$cur")) return fi @@ -445,7 +445,7 @@ complete -o bashdefault -o default -F _h { case "$prev" in -c|--cc|-t|--to|-f|--from|--bcc) - # we need an e-mail address. let the user provide a function + # we need an e-mail address. let the user provide a function # to get them if [ "$(type -t _hg_emails)" = function ]; then local arg=to