{"thread":{"id":"25491","subject":"bash completion broken on ubuntu 10.10?","startedAt":"2010-10-20T23:04:09Z","lastAt":"2010-10-21T10:35:03Z","messageCount":5,"participants":["SZEDER Gábor","Brian Gernhardt","Peter van der Does","Kevin Ballard","Mathias Lafeldt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"153905","messageId":"20101020230409.GB1767@neumann","threadId":"25491","inReplyTo":null,"subject":"bash completion broken on ubuntu 10.10?","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2010-10-20T23:04:09Z","receivedAt":"2010-10-20T23:04:09Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Hi,\n\nGit's bash completion script offers possible arguments to some\noptions, e.g. it lists pretty formats after 'git log --pretty=<TAB>',\nmerge tools after 'git mergetool --tool=<TAB>', refs after 'git commit\n--reuse-message=<TAB>', etc.\n\nOn a three day old ubuntu 10.10 install these don't work anymore; the\ncompletion script offers the list of files in all those cases.\n\nAfter a bit of investigation I found that when I press TAB after 'git\nlog --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'\nand ${COMP_WORDS[COMP_CWORD]} contains \"=\".  Weird.\n\nThen I remembered that we had some COMP_WORDBREAKS issues in the past\n(db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:\nportion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't\nsee anything suspicious (it contains \"'><=;|&(: ).  Removing the '='\nmakes the listing after 'git log --pretty=' work, but breaks many\nother things badly.\n\nI don't have any ideas what could possibly be wrong here (but it's too\nlate here for any bright ideas anyway...).  Could someone confirm or\ndeny this behaviour on ubuntu 10.10?\n\n\nThanks,\nGábor\n"},{"id":"153907","messageId":"0BBE4478-48AB-460E-A2D5-2121FC589886@gernhardtsoftware.com","threadId":"25491","inReplyTo":"20101020230409.GB1767@neumann","subject":"Re: bash completion broken on ubuntu 10.10?","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2010-10-20T23:33:17Z","receivedAt":"2010-10-20T23:33:17Z","isPatch":false,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"\nOn Oct 20, 2010, at 7:04 PM, SZEDER Gábor wrote:\n\n> Hi,\n> \n> Git's bash completion script offers possible arguments to some\n> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',\n> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit\n> --reuse-message=<TAB>', etc.\n> \n> On a three day old ubuntu 10.10 install these don't work anymore; the\n> completion script offers the list of files in all those cases.\n\n> I don't have any ideas what could possibly be wrong here (but it's too\n> late here for any bright ideas anyway...).  Could someone confirm or\n> deny this behaviour on ubuntu 10.10?\n\nConfirmed.  Completion works properly on OS X, but fails on Ubuntu 10.10\n\nOS X 10.6.4:\n  bash: 3.2.48\n  git:  1.7.3.1.209.g52408 (next + my t/gitweb-lib patch)\n  output:\n$ git log --pretty=<tab><tab>\nemail     full      medium    raw       \nformat:   fuller    oneline   short  \n\nUbuntu 10.10:\n  bash: 4.1.5\n  git:  1.7.1 (from apt)\n  output:\n$ git log --pretty=<tab><tab>\n.bash/               .irbrc\n.bash_history        .less\n.bash_logout         .local/\n.bash_profile        Music/\n--More--\n\n~~ Brian"},{"id":"153938","messageId":"20101020225018.46f7e70e@montecarlo.grandprix.int","threadId":"25491","inReplyTo":"20101020230409.GB1767@neumann","subject":"Re: bash completion broken on ubuntu 10.10?","fromName":"Peter van der Does","fromEmail":"peter@avirtualhome.com","sentAt":"2010-10-21T02:50:18Z","receivedAt":"2010-10-21T02:50:18Z","isPatch":false,"sender":{"key":"peter@avirtualhome.com","avatar":"https://avatars.githubusercontent.com/u/380071?v=4"},"body":"On Thu, 21 Oct 2010 01:04:09 +0200\nSZEDER Gábor <szeder@ira.uka.de> wrote:\n\n> Hi,\n> \n> Git's bash completion script offers possible arguments to some\n> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',\n> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit\n> --reuse-message=<TAB>', etc.\n> \n> On a three day old ubuntu 10.10 install these don't work anymore; the\n> completion script offers the list of files in all those cases.\n> \n> After a bit of investigation I found that when I press TAB after 'git\n> log --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'\n> and ${COMP_WORDS[COMP_CWORD]} contains \"=\".  Weird.\n> \n> Then I remembered that we had some COMP_WORDBREAKS issues in the past\n> (db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:\n> portion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't\n> see anything suspicious (it contains \"'><=;|&(: ).  Removing the '='\n> makes the listing after 'git log --pretty=' work, but breaks many\n> other things badly.\n> \n> I don't have any ideas what could possibly be wrong here (but it's too\n> late here for any bright ideas anyway...).  Could someone confirm or\n> deny this behaviour on ubuntu 10.10?\n> \n> \n> Thanks,\n> Gábor\n> \n\nMy guess is that it has to do with Bash 4, the equal sign must be seen\nas a new word. I'm running Ubuntu 10.04 and have the same problem.\nI fixed the problem locally, I just don't know if that works on Bash 3\nand I doubt it will work on Bash 3.\n\nI changed the script only for git log, not other commands yet, like \ngit am --whitespace=<tab><tab>\n\n\n-- \nPeter van der Does\n\nGPG key: E77E8E98\n\nIRC: Ganseki on irc.freenode.net\nTwitter: @petervanderdoes\n\nWordPress Plugin Developer\nBlog: http://blog.avirtualhome.com\nForums: http://forums.avirtualhome.com\nTwitter: @avhsoftware\n"},{"id":"153940","messageId":"15A9C855-A450-467F-9502-9ADA3D59F64F@sb.org","threadId":"25491","inReplyTo":"20101020225018.46f7e70e@montecarlo.grandprix.int","subject":"Re: bash completion broken on ubuntu 10.10?","fromName":"Kevin Ballard","fromEmail":"kevin@sb.org","sentAt":"2010-10-21T04:44:38Z","receivedAt":"2010-10-21T04:44:38Z","isPatch":false,"sender":{"key":"kevin@sb.org","avatar":"https://avatars.githubusercontent.com/u/714?v=4"},"body":"On Oct 20, 2010, at 7:50 PM, Peter van der Does wrote:\n\n> On Thu, 21 Oct 2010 01:04:09 +0200\n> SZEDER Gábor <szeder@ira.uka.de> wrote:\n> \n>> Hi,\n>> \n>> Git's bash completion script offers possible arguments to some\n>> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',\n>> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit\n>> --reuse-message=<TAB>', etc.\n>> \n>> On a three day old ubuntu 10.10 install these don't work anymore; the\n>> completion script offers the list of files in all those cases.\n>> \n>> After a bit of investigation I found that when I press TAB after 'git\n>> log --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'\n>> and ${COMP_WORDS[COMP_CWORD]} contains \"=\".  Weird.\n>> \n>> Then I remembered that we had some COMP_WORDBREAKS issues in the past\n>> (db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:\n>> portion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't\n>> see anything suspicious (it contains \"'><=;|&(: ).  Removing the '='\n>> makes the listing after 'git log --pretty=' work, but breaks many\n>> other things badly.\n>> \n>> I don't have any ideas what could possibly be wrong here (but it's too\n>> late here for any bright ideas anyway...).  Could someone confirm or\n>> deny this behaviour on ubuntu 10.10?\n>> \n>> \n>> Thanks,\n>> Gábor\n>> \n> \n> My guess is that it has to do with Bash 4, the equal sign must be seen\n> as a new word. I'm running Ubuntu 10.04 and have the same problem.\n> I fixed the problem locally, I just don't know if that works on Bash 3\n> and I doubt it will work on Bash 3.\n> \n> I changed the script only for git log, not other commands yet, like \n> git am --whitespace=<tab><tab>\n\nLooks like you're right. I'm running bash 4.1.7 on OS X and it's broken here.\n\n-Kevin Ballard"},{"id":"153949","messageId":"4CC01757.9040706@debugon.org","threadId":"25491","inReplyTo":"20101020225018.46f7e70e@montecarlo.grandprix.int","subject":"Re: bash completion broken on ubuntu 10.10?","fromName":"Mathias Lafeldt","fromEmail":"misfire@debugon.org","sentAt":"2010-10-21T10:35:03Z","receivedAt":"2010-10-21T10:35:03Z","isPatch":false,"sender":{"key":"misfire@debugon.org","avatar":"https://avatars.githubusercontent.com/u/158074?v=4"},"body":"On 10/21/2010 04:50 AM, Peter van der Does wrote:\n> On Thu, 21 Oct 2010 01:04:09 +0200\n> SZEDER Gábor <szeder@ira.uka.de> wrote:\n> \n>> Hi,\n>>\n>> Git's bash completion script offers possible arguments to some\n>> options, e.g. it lists pretty formats after 'git log --pretty=<TAB>',\n>> merge tools after 'git mergetool --tool=<TAB>', refs after 'git commit\n>> --reuse-message=<TAB>', etc.\n>>\n>> On a three day old ubuntu 10.10 install these don't work anymore; the\n>> completion script offers the list of files in all those cases.\n>>\n>> After a bit of investigation I found that when I press TAB after 'git\n>> log --pretty=', then ${COMP_WORDS[COMP_CWORD-1]} contains '--pretty'\n>> and ${COMP_WORDS[COMP_CWORD]} contains \"=\".  Weird.\n>>\n>> Then I remembered that we had some COMP_WORDBREAKS issues in the past\n>> (db8a9ff, bash completion: Resolve git show ref:path<tab> losing ref:\n>> portion, 2008-07-15)).  So I looked at my $COMP_WORDBREAKS, but didn't\n>> see anything suspicious (it contains \"'><=;|&(: ).  Removing the '='\n>> makes the listing after 'git log --pretty=' work, but breaks many\n>> other things badly.\n>>\n>> I don't have any ideas what could possibly be wrong here (but it's too\n>> late here for any bright ideas anyway...).  Could someone confirm or\n>> deny this behaviour on ubuntu 10.10?\n>>\n>>\n>> Thanks,\n>> Gábor\n>>\n> \n> My guess is that it has to do with Bash 4, the equal sign must be seen\n> as a new word. I'm running Ubuntu 10.04 and have the same problem.\n> I fixed the problem locally, I just don't know if that works on Bash 3\n> and I doubt it will work on Bash 3.\n> \n> I changed the script only for git log, not other commands yet, like \n> git am --whitespace=<tab><tab>\n> \n> \n\nSame problem here.\n\n$ lsb_release -a\nNo LSB modules are available.\nDistributor ID:\tUbuntu\nDescription:\tUbuntu 10.04.1 LTS\nRelease:\t10.04\nCodename:\tlucid\n\n$ bash --version \nGNU bash, version 4.1.5(1)-release (i486-pc-linux-gnu)\n\n$ shopt\nautocd         \toff\ncdable_vars    \toff\ncdspell        \toff\ncheckhash      \toff\ncheckjobs      \toff\ncheckwinsize   \ton\ncmdhist        \ton\ncompat31       \toff\ncompat32       \toff\ncompat40       \toff\ndirspell       \toff\ndotglob        \toff\nexecfail       \toff\nexpand_aliases \ton\nextdebug       \toff\nextglob        \ton\nextquote       \ton\nfailglob       \toff\nforce_fignore  \ton\nglobstar       \toff\ngnu_errfmt     \toff\nhistappend     \ton\nhistreedit     \toff\nhistverify     \toff\nhostcomplete   \toff\nhuponexit      \toff\ninteractive_comments\ton\nlithist        \toff\nlogin_shell    \toff\nmailwarn       \toff\nno_empty_cmd_completion\toff\nnocaseglob     \toff\nnocasematch    \toff\nnullglob       \toff\nprogcomp       \ton\npromptvars     \ton\nrestricted_shell\toff\nshift_verbose  \toff\nsourcepath     \ton\nxpg_echo       \toff\n\n-Mathias\n"}]}