{"thread":{"id":"45283","subject":"[RFC PATCH 1/2] completion: add bash completion for 'git rev-list'","startedAt":"2017-03-03T18:52:32Z","lastAt":"2017-03-03T18:52:32Z","messageCount":1,"participants":["Denton Liu"],"isPatch":true,"patchVersion":1,"patchTotal":2},"messages":[{"id":"313216","messageId":"20170303123526.GA19532@arch-attack.localdomain","threadId":"45283","inReplyTo":null,"subject":"[RFC PATCH 1/2] completion: add bash completion for 'git rev-list'","fromName":"Denton Liu","fromEmail":"liu.denton@gmail.com","sentAt":"2017-03-03T12:35:26Z","receivedAt":"2017-03-03T18:52:32Z","isPatch":true,"sender":{"key":"liu.denton@gmail.com","avatar":"https://avatars.githubusercontent.com/u/9620836?v=4"},"body":"Signed-off-by: Denton Liu <liu.denton@gmail.com>\n---\nThis patch isn't strictly necessary since 'git rev-list' isn't a porcelain\ncommand. However, it might be nice to include in case users interactively call\n'git rev-list' anyway.\n---\n contrib/completion/git-completion.bash | 30 ++++++++++++++++++++++++++++++\n 1 file changed, 30 insertions(+)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex 41ee52991..412485369 100644\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -2499,6 +2499,36 @@ _git_revert ()\n \t__gitcomp_nl \"$(__git_refs)\"\n }\n \n+__git_rev_list_options=\"\n+ --max-count= --skip= --max-age= --min-age= --sparse --merges --no-merges\n+ --min-parents= --no-min-parents --max-parents= --no-max-parents --first-parent\n+ --remove-empty --full-history --not --all --branches= --tags= --remotes=\n+ --glob= --ignore-missing --stdin --quiet --topo-order --parents --timestamp\n+ --left-right --left-only --right-only --cherry-mark --cherry-pick --encoding=\n+ --author= --committer= --grep= --regexp-ignore-case --extended-regexp\n+ --fixed-strings --date= --objects --objects-edge --objects-edge-aggressive\n+ --unpacked --pretty --header --bisect --bisect-vars --bisect-all --merge\n+ --reverse --walk-reflogs --no-walk --do-walk --count --use-bitmap-index\n+\"\n+\n+__git_complete_rev_list_command ()\n+{\n+\tcase \"$cur\" in\n+\t--*)\n+\t\t__gitcomp \"$__git_rev_list_options\"\n+\t\treturn 0\n+\t\t;;\n+\tesac\n+\treturn 1\n+}\n+\n+_git_rev_list ()\n+{\n+\t__git_has_doubledash && return\n+\n+\t__git_complete_rev_list_command || __gitcomp_nl \"$(__git_refs)\"\n+}\n+\n _git_rm ()\n {\n \tcase \"$cur\" in\n-- \n2.12.0.1.g5415fdfc5.dirty\n\n"}]}