{"thread":{"id":"17148","subject":"[PATCH 2/3] Makes the bash completion script try *bash* completions before simple, filetype completions when a git completion is not found. If bash, completions aren't available, the default file completions are used. This, behavior was inspired by Mercurial's bash completion script.","startedAt":"2009-01-13T16:10:21Z","lastAt":"2009-01-13T16:38:16Z","messageCount":2,"participants":["Ted Pavlic","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"100284","messageId":"496CBCED.80402@tedpavlic.com","threadId":"17148","inReplyTo":null,"subject":"[PATCH 2/3] Makes the bash completion script try *bash* completions before simple, filetype completions when a git completion is not found. If bash, completions aren't available, the default file completions are used. This, behavior was inspired by Mercurial's bash completion script.","fromName":"Ted Pavlic","fromEmail":"ted@tedpavlic.com","sentAt":"2009-01-13T16:10:21Z","receivedAt":"2009-01-13T16:10:21Z","isPatch":true,"sender":{"key":"ted@tedpavlic.com","avatar":"https://gravatar.com/avatar/d085392370ff4c028cf17a0e81e0647744c9682fbcb36b499f31d08ef80ef569?d=mp&s=160"},"body":"\nSecond in a series of patches that make bash completions more robust to\ndifferent interactive shell configurations and editors.\n\n\n[PATCH 2/3] Makes the bash completion script try *bash* completions \nbefore simple\n  filetype completions when a git completion is not found. If bash\n  completions aren't available, the default file completions are used. This\n  behavior was inspired by Mercurial's bash completion script.\n\n\nSigned-off-by: Ted Pavlic <ted@tedpavlic.com>\n---\n  contrib/completion/git-completion.bash |    9 ++++++---\n  1 files changed, 6 insertions(+), 3 deletions(-)\n\ndiff --git a/contrib/completion/git-completion.bash \nb/contrib/completion/git-completion.bash\nindex 5d1515c..201f9a6 100755\n--- a/contrib/completion/git-completion.bash\n+++ b/contrib/completion/git-completion.bash\n@@ -1766,13 +1766,16 @@ _gitk ()\n  \t__git_complete_revlist\n  }\n\n-complete -o default -o nospace -F _git git\n-complete -o default -o nospace -F _gitk gitk\n+complete -o bashdefault -o default -o nospace -F _git git 2>/dev/null \\\n+\t|| complete -o default -o nospace -F _git git\n+complete -o bashdefault -o default -o nospace -F _gitk gitk 2>/dev/null \\\n+\t|| complete -o default -o nospace -F _gitk gitk\n\n  # The following are necessary only for Cygwin, and only are needed\n  # when the user has tab-completed the executable name and consequently\n  # included the '.exe' suffix.\n  #\n  if [ Cygwin = \"$(uname -o 2>/dev/null)\" ]; then\n-complete -o default -o nospace -F _git git.exe\n+complete -o bashdefault -o default -o nospace -F _git git.exe 2>/dev/null \\\n+\t|| complete -o default -o nospace -F _git git.exe\n  fi\n-- \n1.6.1.87.g15624\n"},{"id":"100287","messageId":"20090113163816.GR10179@spearce.org","threadId":"17148","inReplyTo":"496CBCED.80402@tedpavlic.com","subject":"Re: [PATCH 2/3] Makes the bash completion script try *bash* completions before simple, filetype completions when a git completion is not found. If bash, completions aren't available, the default file completions are used. This, behavior was inspired by Mercurial's bash completion script.","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2009-01-13T16:38:16Z","receivedAt":"2009-01-13T16:38:16Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Ted Pavlic <ted@tedpavlic.com> wrote:\n>\n> Second in a series of patches that make bash completions more robust to\n> different interactive shell configurations and editors.\n>\n>\n> [PATCH 2/3] Makes the bash completion script try *bash* completions  \n> before simple\n>  filetype completions when a git completion is not found. If bash\n>  completions aren't available, the default file completions are used. This\n>  behavior was inspired by Mercurial's bash completion script.\n\nAgain, I would have used this as my commit message:\n\n\tbash-completion: Try bash completions before file completions\n\n\tTry bash completions before any simple file completions\n\twhenever a git completion is not found.  This may help\n\tusers to complete BLAH BLAH BLAH WHAT THE HECK IS THIS GOOD\n\tFOR ANYWAY.\n\n\tBehavior was inspired by Mercurial's bash completion script.\n\nNo ack, because I still don't understand why this is a good thing.\nYes, I could look it up online in the bash docs.  I shouldn't need\nto go do research like that to understand the justification for\na change, it should be better explained in the message.\n\n-- \nShawn.\n"}]}