Saturday, June 12, 2010

Turn on Bash Smart Completion (via Ubuntu Blog)

We normally type half command or name of the file and proceed with tab in Dos and that feature is also present in Ubuntu.To enable it in simple terms:
1.Open Application--->Accessories-->Terminal
2.Entr the command ---------Sudo vi /etc/bash.bashrc
3.You will be prompted for password,enter it and you will see some matter,most of which you wan to under stand.Uncomment the below lines,by removing the # before every line.
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
4.Press Esc-->colon-->wq-->Enter

The Bash shell has this sweet feature where you can use the TAB key to auto-complete certain things. For example, when I am in my home directory, the following command: $cd Do[TAB-key] will automatically yield: $cd Documents If you are an absolute novice, like I was, not so long ago, discovering tab completion in the terminal can make you go "Wow!". Wait till you hear the rest now :) Though you can use the TAB key to complete the names of files a … Read More

via Ubuntu Blog

No comments:

Post a Comment