Make generic the completion for reflog subcommands and its options.
Note that we still need to special case the options for "show".
Signed-off-by: Rubén Justo <rjusto@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
_git_reflog ()
{
- local subcommands="show delete expire"
- local subcommand="$(__git_find_subcommand "$subcommands" "show")"
+ local subcommands subcommand
+
+ __git_resolve_builtins "reflog"
+
+ subcommands="$___git_resolved_builtins"
+ subcommand="$(__git_find_subcommand "$subcommands" "show")"
case "$subcommand,$cur" in
show,--*)
"
return
;;
+ $subcommand,--*)
+ __gitcomp_builtin "reflog_$subcommand"
+ return
+ ;;
esac
__git_complete_refs