We know some commands doesn't work on some files/directories. As an example we cannot use "cd" command on a file and when we try to press tab button to complete our line, the system doesn't show us any file for completion.
But I encountered an interesting scenario when I try autocomplete feature to complete a file name that finish with ".a". I can explain this scenario like below:
[root@myserver multipath]# ls -1 idlist idlist.a idlist.b multipath.a multipath.sh
I have these files in a directory.
- When I type "vim m" and then press the "tab" button the system auto-complete this command as "vim multipath.sh".
- When I type "vim idlist" and then press the "tab" button the system show me two option: "idlist" and "idlist.b". There is no "idlist.a" option.
- And finally, when I use "cat (or anything else)" the system show me files that finish with ".a" (with all options). There is no confusing something at there.
What is the secret behind of ".a"? Why the system does not complete this files when we use vi/vim command?