Comment 10 for bug 692562

Revision history for this message
Dave Gilbert (ubuntu-treblig) wrote :

Edited the title.

The actual error originates from __get_cword_at_cursor_by_ref in /etc/bash_completion in the code at:

    if [[ "${words[cword]:0:${#cur}}" != "$cur" ]]; then
        # We messed up. At least return the whole word so things keep working
        cur2=${words[cword]}
    else
        cur2=${cur:0:$index}
    fi

The $index in that last expression is -1 in this case.

But then the bash gets a bit deep for me to dig further.

Dave