Mikael Auno wrote:
Hi. I don't know if prefixing a command with a backslash to suppress
alias expansion is a intentional feature or not. If it is though, tab
completing a (complete or incomplete) command prefixed with a
backslash ought not remove the backslash. Current behavior seems to
be to complete something like "\mpla" to "mplayer" and not to
"\mplayer" as I would expect.
I would be happy to try to fix it myself if no one has time to do it.
A pointer on where to start looking in that case would be good though
as I'm not at all familiar with the code of Zsh.
You're quite right that this should work better, but I suspect fixing it is
a real pig. Quoting is one of the messiest parts of completion (regular
viewers will know this is rather a strong statement). I think fixing it
properly by leaving all quoting in place isn't going to be easy (to put it
mildly).
I think you have a workaround, though: use an initial single quote. Not
only does that get kept, the closing single quote is put in place
afterwards. Is this good enough? (It would be good to document this but
goodness knows where it goes.)