diff mbox series

[RFC,1/6] completion: complete new old actions, start opts

Message ID ac2d9b41-be28-45b8-9113-da59a85d791e@smtp-relay.sendinblue.com (mailing list archive)
State Superseded
Headers show
Series completion: improvements for git-bisect | expand

Commit Message

Britton Kerin Jan. 2, 2024, 7:57 p.m. UTC
Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com>
---
 contrib/completion/git-completion.bash | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 185b47d802..15d22ff7d9 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1449,7 +1449,7 @@  _git_bisect ()
 {
 	__git_has_doubledash && return
 
-	local subcommands="start bad good skip reset visualize replay log run"
+	local subcommands="start bad new good old terms skip reset visualize replay log run help"
 	local subcommand="$(__git_find_on_cmdline "$subcommands")"
 	if [ -z "$subcommand" ]; then
 		__git_find_repo_path
@@ -1462,7 +1462,20 @@  _git_bisect ()
 	fi
 
 	case "$subcommand" in
-	bad|good|reset|skip|start)
+	start)
+		case "$cur" in
+		--*)
+			__gitcomp "--term-new --term-bad --term-old --term-good --first-parent --no-checkout"
+			return
+			;;
+		*)
+			;;
+		esac
+		;;
+	esac
+
+	case "$subcommand" in
+	bad|new|good|old|reset|skip|start)
 		__git_complete_refs
 		;;
 	*)