OSX ZSH magic
Posted by Mikko Lehtinen on Saturday 25. September 2010 | Tagged as osx, zsh
Terminal is perfect tool for hackers but it can increase anyones productivity.
ZSH is my default shell in Mac now. Read My Extravagant Zsh Prompt or zsh: The last shell you’ll ever need! why you should choose ZSH over OSX’s default Bash.
Tip 1: Use key bindings.
Here are some of my favourites:
Moving around:
- Ctrl + a Jump to the beginning of line
- Ctrl + e Jump to the end of line
- Crtl + left/right Jump word
Note: you must configure Terminal key bindings to make Crtl+arrows work for OSX.
Clearing:
- Ctrl + L Clear the screen
- Ctrl + U Clears the line before the cursor
- Ctrl + K Clear the line after the cursor
- Ctrl + W Delete the word before the cursor
Searching & History:
- Ctrl + r Search history
- Ctrl + j Stop search and edit
Tip 2: use preconfigured environments
Use shell framework such as oh-my-zsh or dotfiles. They give you helpers and preconfigured, easily customized environment which can be shared easily with all your computers. I chose oh-my-zsh and my configuration is available on GitHub.
Tip 3: replace Terminal.app
Replace Terminal.app with improved terminals with added features. Some options are iTerm or Visor, which I’m using.