{"thread":{"id":"6702","subject":"[PATCH 6/6] bash: Support git-bisect and its subcommands.","startedAt":"2007-02-05T20:44:37Z","lastAt":"2007-02-05T21:05:40Z","messageCount":2,"participants":["Shawn O. Pearce","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"33666","messageId":"20070205204437.GF8824@spearce.org","threadId":"6702","inReplyTo":null,"subject":"[PATCH 6/6] bash: Support git-bisect and its subcommands.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-02-05T20:44:37Z","receivedAt":"2007-02-05T20:44:37Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"We now offer completion support for git-bisect's subcommands,\nas well as ref name completion on the good/bad/reset subcommands.\nThis should make interacting with git-bisect slightly easier on\nthe fingers.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n contrib/completion/git-completion.bash |   31 +++++++++++++++++++++++++++++++\n 1 files changed, 31 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex c410678..eecdaa0 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -407,6 +407,35 @@ _git_add ()\n \tCOMPREPLY=()\n }\n \n+_git_bisect ()\n+{\n+\tlocal i c=1 command\n+\twhile [ $c -lt $COMP_CWORD ]; do\n+\t\ti=\"${COMP_WORDS[c]}\"\n+\t\tcase \"$i\" in\n+\t\tstart|bad|good|reset|visualize|replay|log)\n+\t\t\tcommand=\"$i\"\n+\t\t\tbreak\n+\t\t\t;;\n+\t\tesac\n+\t\tc=$((++c))\n+\tdone\n+\n+\tif [ $c -eq $COMP_CWORD -a -z \"$command\" ]; then\n+\t\t__gitcomp \"start bad good reset visualize replay log\"\n+\t\treturn\n+\tfi\n+\n+\tcase \"$command\" in\n+\tbad|good|reset)\n+\t\t__gitcomp \"$(__git_refs)\"\n+\t\t;;\n+\t*)\n+\t\tCOMPREPLY=()\n+\t\t;;\n+\tesac\n+}\n+\n _git_branch ()\n {\n \t__gitcomp \"$(__git_refs)\"\n@@ -910,6 +939,7 @@ _git ()\n \tam)          _git_am ;;\n \tadd)         _git_add ;;\n \tapply)       _git_apply ;;\n+\tbisect)      _git_bisect ;;\n \tbranch)      _git_branch ;;\n \tcheckout)    _git_checkout ;;\n \tcherry)      _git_cherry ;;\n@@ -955,6 +985,7 @@ complete -o default -o nospace -F _git git\n complete -o default -o nospace -F _gitk gitk\n complete -o default -o nospace -F _git_am git-am\n complete -o default -o nospace -F _git_apply git-apply\n+complete -o default -o nospace -F _git_bisect git-bisect\n complete -o default -o nospace -F _git_branch git-branch\n complete -o default -o nospace -F _git_checkout git-checkout\n complete -o default -o nospace -F _git_cherry git-cherry\n-- \n1.5.0.rc3.58.g79812\n"},{"id":"33671","messageId":"eq8649$t2n$2@sea.gmane.org","threadId":"6702","inReplyTo":"20070205204437.GF8824@spearce.org","subject":"Re: [PATCH 6/6] bash: Support git-bisect and its subcommands.","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-02-05T21:05:40Z","receivedAt":"2007-02-05T21:05:40Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Shawn O. Pearce wrote:\n\n> We now offer completion support for git-bisect's subcommands,\n> as well as ref name completion on the good/bad/reset subcommands.\n> This should make interacting with git-bisect slightly easier on\n> the fingers.\n\nThanks a lot.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}