That doesn't mean that it isn't being quoted now, in the function in
question.
It's functionally equivalent to the second one, I believe.
Actually, this comment means the opposite: we would want ~ in the
command line unquoted, but that won't happen because DIR is quoted
later. So we require DIR to be non-abbreviated.
Anyway, let's leave that off until you find a definite case where it's a
problem.
I've pushed the other change now in ab3ba91.
Please see if it fixes the problem, and if so, close the bug.
--
Kaushal Modi