From c689c38bc2dceac3f8fe975472f12c0dbe473537 Mon Sep 17 00:00:00 2001 From: Rubén Justo Date: Sat, 2 Mar 2024 16:50:47 +0100 Subject: completion: reflog show MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's add completion for in "reflog show" so that the user can easily discover uses like: $ git reflog --since=1.day.ago Signed-off-by: Rubén Justo Signed-off-by: Junio C Hamano --- contrib/completion/git-completion.bash | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'contrib/completion/git-completion.bash') diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index ff216f1c65..d4f0e08f58 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -2407,6 +2407,16 @@ _git_rebase () _git_reflog () { local subcommands="show delete expire" + local subcommand="$(__git_find_subcommand "$subcommands" "show")" + + case "$subcommand,$cur" in + show,--*) + __gitcomp " + $__git_log_common_options + " + return + ;; + esac __git_complete_refs -- cgit v1.3