$ cd Dow [press tab key]
it will help you to complete the command to
$ cd Downloads
Sometime, bash shell can't identify your file name since there are multiple files with same initials. For example, you type
cd Do [press tab key]You may see
Documents DownloadsThen now you need to input more key to specify the file name
In fact, bash shell in ubuntu is smarter now, you can find that codes which enable smart completion in the bashrc file.
if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi
If you view /etc/bash_completion, it defines which program to use which file type. For example,
complete -f -X '!*.@(pdf|PDF)' acroread gpdf xpdfwhich means for program "acroread", "gpdf" or "xpdf", when you press tab key under bash shell, it will find files with pdf or PDF extension only.
However, you may find that for sqlite3, the default support extension is .sqlite. Sometimes, I use .db as sqlite3 file. Thus I changed it to
complete -f -X '!*.@(sqlite|db)' sqlite3