+OK
  • Home
  • About
  • Categories
  • Tags
  • Archives

From Bash to Zsh

[TOC]

Install Zsh

With Homebrew, you can just install Zsh by:

$ brew install zsh

As a beginner, you need not to memorise all the commands' options with autocomplete features of Zsh. The config can be simply clone from oh-my-zsh, which is one of the most starred projects in GitHub and it just fits us beginners!

Here are some reasons why using Zsh instead of Bash: 9 reason to use zsh (zh-CN).

Plugin Tips

git

The plugin Git is installed by default. It is very helpful to use the alias provided in this plugin.

Alias Command
g git
ga git add
gas git add --all
gcmsg git commit -m
ggp git push origin $(current_branch)

More alias can be viewed in Git Commands Cheat Sheet.

autojump

Autojump helps to go to the past folders with j and the folder's name (fuzzy search) to fast jump in Zsh. It is one of the most powerful plugins in Zsh.

First, you need to install it:

$ brew install autojump

Then Remember to add the following code in .zshrc:

[[ -s `brew --prefix`/etc/autojump.sh ]] && . `brew --prefix`/etc/autojump.sh

osx

  • man-preview file: open file in pdf by preview
  • quick-look: quick preview
  • pfd: show to the folder of current finder
  • cdf: change to the folder of current finder

Share on: Twitter ❄ Facebook ❄ Google+ ❄ Email

So what do you think of it? Do I miss something? Leave your comments below...

Comments
comments powered by Disqus

  • « 毛氏红烧肉
  • Sublime Text + LaTeX Tool + Skim »

Published

Oct 11, 2015

Last Updated

Oct 14, 2015

Category

Coding

Tags

  • bash 1
  • shell 1
  • zsh 1

Contact

  • Creative Commons License
    "+OK" by Joe is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.
  • Powered by Pelican. Theme: Elegant by Talha Mansoor