make bash completion script more reliable

especially if keys include quotes, backslash or spaces

tested with:
* foo1"
* foo2'
* foo3\'
* foo4\foo4
* foo5 foo5