fix completion for device names with whitespace

Not sure this is the best way, but it's relatively clean, and it works.