{"thread":{"id":"43767","subject":"[PATCH 1/2] Teach bash how to complete long options for git-commit.","startedAt":"2006-11-28T17:12:08Z","lastAt":"2006-11-28T17:12:08Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"298389","messageId":"20061128171208.GA28830@spearce.org","threadId":"43767","inReplyTo":null,"subject":"[PATCH 1/2] Teach bash how to complete long options for git-commit.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-28T17:12:08Z","receivedAt":"2006-11-28T17:12:08Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Signed-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n It appears as though this patch was dropped, probably due\n to the fact that paint commonly dries faster than tab\n completion of --author= on the kernel.git repository runs.\n\n So this is a resubmit without the paint drying features.\n\n contrib/completion/git-completion.bash |   16 ++++++++++++++++\n 1 files changed, 16 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex d8ae4d7..be978cf 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -398,6 +398,20 @@ _git_cherry_pick ()\n \tesac\n }\n \n+_git_commit ()\n+{\n+\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n+\tcase \"$cur\" in\n+\t--*)\n+\t\tCOMPREPLY=($(compgen -W \"\n+\t\t\t--all --author= --signoff --verify --no-verify\n+\t\t\t--edit --amend --include --only\n+\t\t\t\" -- \"$cur\"))\n+\t\treturn\n+\tesac\n+\tCOMPREPLY=()\n+}\n+\n _git_diff ()\n {\n \t__git_complete_file\n@@ -768,6 +782,7 @@ _git ()\n \tcat-file)    _git_cat_file ;;\n \tcheckout)    _git_checkout ;;\n \tcherry-pick) _git_cherry_pick ;;\n+\tcommit)      _git_commit ;;\n \tdiff)        _git_diff ;;\n \tdiff-tree)   _git_diff_tree ;;\n \tfetch)       _git_fetch ;;\n@@ -804,6 +819,7 @@ complete -o default            -F _git_branch git-branch\n complete -o default -o nospace -F _git_cat_file git-cat-file\n complete -o default            -F _git_checkout git-checkout\n complete -o default            -F _git_cherry_pick git-cherry-pick\n+complete -o default            -F _git_commit git-commit\n complete -o default -o nospace -F _git_diff git-diff\n complete -o default            -F _git_diff_tree git-diff-tree\n complete -o default -o nospace -F _git_fetch git-fetch\n-- \n1.4.4.1.g289c2\n"}]}