When no subcommand is specified to "reflog" we assume "show" [1]: $ git reflog -h usage: git reflog [show] [<log-options>] [<ref>] ... We are not completing correctly this implicit uses of "show": With ... $ git checkout -b default ... we are not completing "default": $ git reflog def<TAB><TAB> And we are incorrectly returning the "subcommands" when: $ git reflog default <TAB><TAB> delete expire show This series fixes this and also adds completion for <log-options> in "reflog show", so that the user can easily discover uses like: $ git reflog --since=1.day.ago 1. cf39f54efc (git reflog show, 2007-02-08) Rubén Justo (4): completion: introduce __gitcomp_subcommand completion: introduce __git_find_subcommand completion: reflog with implicit "show" completion: reflog show <log-options> contrib/completion/git-completion.bash | 63 +++++++++++++++++++++++--- t/t9902-completion.sh | 11 +++++ 2 files changed, 68 insertions(+), 6 deletions(-) -- 2.43.0