Comment 4 for bug 692562

Revision history for this message
Mark Munkacsy (mark-munkacsy) wrote : Re: ssh -i completion throws bash error

I can also reproduce this, but the key sequence must be followed exactly. I'm running bash 4.1.5(1)-release on Ubuntu 10.10 maverick (Ubuntu 2.6.35-23.41-generic-pae 2.6.35.7). To recreate, I typed the following:
ssh someuser@somehost
Then, before typing <enter>, I used the left arrow key to position the cursor on the space after ssh. I then typed <space><dash><i><space><tab>
This generates an error message which has ranged from "bash: $index: substring expression < 0" to "cword=2er@somehost
words[0]=${!ref}${COMP_WORDS[i]}
words[1]=${!ref}${COMP_WORDS[i]}
words[2]=${!ref}${COMP_WORDS[i]}
cword=2
bash: $index: substring expression < 0". (The error message isn't always the same.)