In ~jacksonc/temp/
there are two files, test.txt
and space test.txt
, both placed there through Windows (using Samba).
Using bash, if I type
cat ~jacksonc/temp/t[tab]
, it autocompletes to
cat ~jacksonc/temp/test.txt
However, if I type
cat ~jacksonc/temp/s[tab]
it autocompletes to
cat /home/jacksonc/temp/space\ test.txt
My question isn't about the backslash, I know why that's there. I'm curious as to why the space causes the ~ to be expanded though?
bash
expands~
to the actual path when using tab completion regardless of whether there's a space in the path or not. I have no idea why the space would make a difference either; I've never heard of such a thing before.