I am a command line fan! I use the terminal for working with files and directories. The directory stack tools – pushd, popd and dirs are superstars compared to what we get from the modern file managers.
In addition to this the shell has some more tricks up its sleeve.
CDPATH lets you set multiple base directories. By default, you have to provide relative path from your current directory to the new directory. Sometimes these relative paths can be long and can cause errors.
By using CDPATH you can ask the shell to look for the directories you have mentioned in additional directories. For example, if I have
/home/anadgouda/projects/xfce and I do
CDPATH=.:~/projects, I can use
cd blog and
cd xfce to change to blog or xfce from anywhere in my file system, as an absolute path. This will help you a lot for those frequently used directories.
shopt -s cdspell
shopt is a way of controlling optional shell behaviour. This command will correct the name automatically when you miss a character in the name or change the case. Though it handles minor errors it is plenty helpful in being productive.
You can add this command to your
~/.inputrc file and the shell will make the autocompletion case-insensitive. Personally, I prefer the case sensitivity, but if you think otherwise, use this and get it done your way.
set show-all-if-ambiguous on
If you are irritated by having to press TAB twice to list possibilities, this command will rescue you. Put this in your
~/.inputrc and the shell will list the matches immediately.
And since this is based on the bash shell, you can use this on all OSs that support it, like Unix systems, Macs and I guess Cygwin as well. Try these out and see if you get more productive with your command line.