{"thread":{"id":"25930","subject":"Re: bash 4.0 breaks some completion scripts","startedAt":"2010-12-02T23:38:48Z","lastAt":"2010-12-03T00:11:57Z","messageCount":2,"participants":["Jonathan Nieder","SZEDER Gábor"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"157161","messageId":"20101202233848.GA8438@burratino","threadId":"25930","inReplyTo":"20101027235919.GB30490@burratino","subject":"Re: bash 4.0 breaks some completion scripts","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-12-02T23:38:48Z","receivedAt":"2010-12-02T23:38:48Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Jonathan Nieder wrote:\n\n> Bash 4.0 changed the rules for completion word splitting so that\n> they are incompatible with 3.x.  I think some Breaks: will be needed\n> to ensure smooth upgrades.\n\nJust FYI: Ah, at last some clarity!\n\n>From the bash 3 manual:\n\n COMP_WORDS\n\tAn array variable (see Arrays below) consisting of the\n\tindividual words in the current command line.  The\n\twords are split on shell metacharacters as the shell\n\tparser would separate them.  This variable is\n\tavailable only in shell functions invoked by the\n\tprogrammable completion facilities (see Programmable\n\tCompletion below).\n\n>From the bash 4 manual:\n\n COMP_WORDS\n\tAn array variable (see Arrays below) consisting of the\n\tindividual words in the current command line.  The\n\tline is split into words as readline would split it,\n\tusing COMP_WORDBREAKS as described above.  This\n\tvariable is available only in shell functions invoked\n\tby the programmable completion facilities (see\n\tProgrammable Completion below).\n\nThe workaround used by the bash-completion scripts is to paste words\nfrom COMP_WORDS together (in _get_comp_words_by_ref).\n\nIf only the NEWS file had mentioned it. :)  \n"},{"id":"157164","messageId":"20101203001157.GC3577@neumann","threadId":"25930","inReplyTo":"20101202233848.GA8438@burratino","subject":"Re: bash 4.0 breaks some completion scripts","fromName":"SZEDER Gábor","fromEmail":"szeder@ira.uka.de","sentAt":"2010-12-03T00:11:57Z","receivedAt":"2010-12-03T00:11:57Z","isPatch":false,"sender":{"key":"szeder.dev@gmail.com","avatar":"https://avatars.githubusercontent.com/u/116324?v=4"},"body":"Hi,\n\n\nOn Thu, Dec 02, 2010 at 05:38:48PM -0600, Jonathan Nieder wrote:\n> Jonathan Nieder wrote:\n> \n> > Bash 4.0 changed the rules for completion word splitting so that\n> > they are incompatible with 3.x.  I think some Breaks: will be needed\n> > to ensure smooth upgrades.\n> \n> Just FYI: Ah, at last some clarity!\n> \n> From the bash 3 manual:\n> \n>  COMP_WORDS\n> \tAn array variable (see Arrays below) consisting of the\n> \tindividual words in the current command line.  The\n> \twords are split on shell metacharacters as the shell\n> \tparser would separate them.  This variable is\n> \tavailable only in shell functions invoked by the\n> \tprogrammable completion facilities (see Programmable\n> \tCompletion below).\n> \n> From the bash 4 manual:\n> \n>  COMP_WORDS\n> \tAn array variable (see Arrays below) consisting of the\n> \tindividual words in the current command line.  The\n> \tline is split into words as readline would split it,\n> \tusing COMP_WORDBREAKS as described above.  This\n> \tvariable is available only in shell functions invoked\n> \tby the programmable completion facilities (see\n> \tProgrammable Completion below).\n\nOh dear, oh dear.  I've just sent a reply to your message on the git\nlist with basically the same findigs. [1]\n\n> The workaround used by the bash-completion scripts is to paste words\n> from COMP_WORDS together (in _get_comp_words_by_ref).\n> \n> If only the NEWS file had mentioned it. :)  \n\nActually, the NEWS file does mention it (and Peter noted it right at\nthe start! [2]):\n\ni.  The programmable completion code now uses the same set of characters as\n    readline when breaking the command line into a list of words.\n\nBut it's really easy to misinterpret this statement, because there is\nand there was a $COMP_WORDBREAKS, so the first thing that\ncomes to mind is that the set of characters in $COMP_WORDBREAKS is\nchanged, leaving you puzzled for weeks when you discover that the\nset of characters is still the same.\n\n\nBest,\nGábor\n\n\n[1] http://marc.info/?l=git&m=129133327312420&w=2\n[2] http://thread.gmane.org/gmane.comp.version-control.git/159516/focus=159628\n"}]}