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.