Saturday, May 25, 2013

Finally, my computer does what I want it to do

Computers have always been so darn literal.

And that is usually a very good thing.

Today, for the first time that I can recall, my computer did what I wanted it to to, not what I told it to do.

~$ cd ~/tmmp
/Users/lex/tmp $

Enable Typo-Fixing Magic in your Shell

Put this handy command in your ~/.bashrc file:

shopt -s cdspell

Other Handy Bash Shell Features

The OSX terminal is loaded with handy features
  • Tab Completion
  • Command History
  • Directory Switching
  • Short Cut Keys

Tab Completion

Type the beginning of file or directory name, hit TAB and the rest of the name will be typed for you.

Command History

Up arrow to see previous command(s).

Down arrow to go back down the list of commands.

Directory Switching

Type cd - to switch back to previous directory.

Short Cut Keys

CTL+AMove cursor to beginning of line
CTL+EMove cursor to end of line
ESC+FMove cursor to beginning of next word
ESC+BMove cursor to beginning of current word
ESC+DelErase previous word
ESC+DErase word

No comments:

Post a Comment