From: Rubén Justo Date: Sat, 2 Mar 2024 15:52:24 +0000 (+0100) Subject: completion: reflog subcommands and options X-Git-Tag: v2.45.0-rc0~110^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1284f9cc11be4b656492938f68befbe4c87d915f;p=thirdparty%2Fgit.git completion: reflog subcommands and options 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 Signed-off-by: Junio C Hamano --- diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index f9fbf1f703..c5c9e9de2d 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2445,8 +2445,12 @@ _git_rebase () _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,--*) @@ -2455,6 +2459,10 @@ _git_reflog () " return ;; + $subcommand,--*) + __gitcomp_builtin "reflog_$subcommand" + return + ;; esac __git_complete_refs