Customize zsh for beginner

zsh means Z shell. A powerful shell with completion capabilities.

Wiki

Install

$ sudo pacman -S zsh

Change to default shell

$ cat /etc/shells

showd list of shell

/bin/sh
/bin/bash
/usr/bin/git-shell
/bin/zsh
/usr/bin/zsh
$ chsh -s /usr/bin/zsh
$ zsh

open zsh

Install oh my zsh

oh-my-zsh

$ git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
$ cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc

Next, copy the settings such as shortcuts set in .bashrc to .zshrc
Reload the configuration file

Added the following line to make tmux run automatically

[[ -z "$TMUX" && ! -z "$PS1" ]] && exec tmux

Reload setting file.

$ source ~/.zshrc

Install zsh-autosuggestions

To show command sggestion from history.
zsh-autosuggestions

$ git clone git://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/plugins/zsh-autosuggestions
$ vim .zshrc

Add plugin. like this.

plugins=(
  git,
  zsh-autosuggestions
)

関連記事