How do you want the system to respond to the user typing `\` manually, such as `add a\ text`<kbd>TAB</kbd>?

This will also come up for partial matches, right? If the files names `a text file` and `a text document` exist, completing `a` will give the user `a\ text\ `; typing <kbd>dTAB</kbd> from there will cause further completion off text with a `\` in it.

I believe the above code will double-escape the `\` in that case.