Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 437932

Summary: app-shells/gentoo-bashcomp: bash 4 breaks versioned atom (=*) completions
Product: Gentoo Linux Reporter: Ryan Hill (RETIRED) <rhill>
Component: Current packagesAssignee: Gentoo Shell Tools project <shell-tools>
Status: CONFIRMED ---    
Severity: normal CC: mruwek.gentoo, pacho, shell-tools
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 431578    

Description Ryan Hill (RETIRED) gentoo-dev 2012-10-11 04:15:32 UTC
In bash 4 COMP_WORDBREAKS is defined as "'><=;|&(: which breaks completions with a package atom starting with =.  For example,

`equery files =app<tab>`

bash-3:
${COMP_WORDS[COMP_CWORD-1]}="files"
${COMP_WORDS[COMP_CWORD]}="=app"

bash-4:
${COMP_WORDS[COMP_CWORD-1]}="="
${COMP_WORDS[COMP_CWORD]}="app"

From what I understand, we should be able to use _get_comp_words_by_ref to work around this, but I'm having trouble finding good documentation.  See http://www.spinics.net/lists/git/msg146922.html for an example.