{"thread":{"id":"43490","subject":"[PATCH 5/6] Support bash completion on symmetric difference operator.","startedAt":"2006-11-05T11:24:56Z","lastAt":"2006-11-05T11:24:56Z","messageCount":1,"participants":["Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"295094","messageId":"20061105112456.GE20495@spearce.org","threadId":"43490","inReplyTo":null,"subject":"[PATCH 5/6] Support bash completion on symmetric difference operator.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-05T11:24:56Z","receivedAt":"2006-11-05T11:24:56Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Now that log, whatchanged, rev-list, etc. support the symmetric\ndifference operator '...' we should provide bash completion for it\njust like we do for '..'.\n\nWhile we are at it we can remove two sed invocations during the\ninteractive prompt and replace them with internal bash operations.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n contrib/completion/git-completion.bash |   11 ++++++++---\n 1 files changed, 8 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash\nindex f258f2f..74be651 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -222,11 +222,16 @@ _git_ls_tree ()\n \n _git_log ()\n {\n-\tlocal cur=\"${COMP_WORDS[COMP_CWORD]}\"\n+\tlocal pfx cur=\"${COMP_WORDS[COMP_CWORD]}\"\n \tcase \"$cur\" in\n+\t*...*)\n+\t\tpfx=\"${cur%...*}...\"\n+\t\tcur=\"${cur#*...}\"\n+\t\tCOMPREPLY=($(compgen -P \"$pfx\" -W \"$(__git_refs)\" -- \"$cur\"))\n+\t\t;;\n \t*..*)\n-\t\tlocal pfx=$(echo \"$cur\" | sed 's/\\.\\..*$/../')\n-\t\tcur=$(echo \"$cur\" | sed 's/^.*\\.\\.//')\n+\t\tpfx=\"${cur%..*}..\"\n+\t\tcur=\"${cur#*..}\"\n \t\tCOMPREPLY=($(compgen -P \"$pfx\" -W \"$(__git_refs)\" -- \"$cur\"))\n \t\t;;\n \t*)\n-- \n1.4.3.3.g9621\n"}]}