Skip to content

Commit 1284f9c

Browse files
rjustogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 476a236 commit 1284f9c

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

contrib/completion/git-completion.bash

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2445,8 +2445,12 @@ _git_rebase ()
24452445

24462446
_git_reflog ()
24472447
{
2448-
local subcommands="show delete expire"
2449-
local subcommand="$(__git_find_subcommand "$subcommands" "show")"
2448+
local subcommands subcommand
2449+
2450+
__git_resolve_builtins "reflog"
2451+
2452+
subcommands="$___git_resolved_builtins"
2453+
subcommand="$(__git_find_subcommand "$subcommands" "show")"
24502454

24512455
case "$subcommand,$cur" in
24522456
show,--*)
@@ -2455,6 +2459,10 @@ _git_reflog ()
24552459
"
24562460
return
24572461
;;
2462+
$subcommand,--*)
2463+
__gitcomp_builtin "reflog_$subcommand"
2464+
return
2465+
;;
24582466
esac
24592467

24602468
__git_complete_refs

0 commit comments

Comments
 (0)