]> git.99rst.org Git - git.git/commit
completion: introduce __git_find_subcommand
authorRubén Justo <redacted>
Sat, 2 Mar 2024 15:51:08 +0000 (16:51 +0100)
committerJunio C Hamano <redacted>
Sun, 3 Mar 2024 22:21:38 +0000 (14:21 -0800)
commit3fec482b5f7f2f13c7465cf79062440a84233d14
tree7d2afc6f9f98a324dc209b4bca866203ef6c273a
parentc689c38bc2dceac3f8fe975472f12c0dbe473537
completion: introduce __git_find_subcommand

Let's have a function to get the current subcommand when completing
commands that follow the syntax:

    git <command> <subcommand>

As a convenience, let's allow an optional "default subcommand" to be
returned if none is found.

Signed-off-by: Rubén Justo <redacted>
Signed-off-by: Junio C Hamano <redacted>
contrib/completion/git-completion.bash
git clone https://git.99rst.org/PROJECT