I have a folder named ~kernel-ppa
inside ~/Downloads
.
aditya@aditya-desktop:~$ cd Downloads/
aditya@aditya-desktop:~/Downloads$ ls
~kernel-ppa
Now when I type cd ~k
and press Tab for automatic expansion, the shell expands it to cd ~kernoops/
instead of cd ~kernel-ppa/
although the folder with same starting characters is already present.
For automatic expansion to work, I need to escape it with . Thus using
cd ~k
and pressing Tab correctly expands it to cd ~kernel-ppa/
. Even using cd
and pressing Tab does the trick.
Why is it so and why do I need to escape? Moreover, what am I escaping since even ~
is not required for automatic expansion?
If I go with the flow and run cd ~kernoops/
and press Enter, the terminal status changes to //
:
aditya@aditya-desktop:~/Downloads$ cd ~kernoops/
aditya@aditya-desktop://$ pwd
//
aditya@aditya-desktop://$ ls
bin cdrom etc initrd.img lost+found mnt proc run srv tmp var
boot dev home lib media opt root sbin sys usr vmlinuz
aditya@aditya-desktop://$
This looks like the /
directory, but pwd
says it is //
. What exactly is it?