分類
zsh

How to setup autojump with zsh

1. git clone autojump

git clone https://github.com/joelthelion/autojump.git

after clone, it will create a dir named autojump
 

2. install autojump

cd autojump
./install.sh

after install autojump, it will create config file of autojump at ~/.autojump
 

3. setup config file for autojump

3-1. vim ~/.zshrc and add autojump at plugins=(xxx autojump)

...
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git autojump)
...

3-2 check shell file name of autojump is correct e.g. ~/.autojump/etc/profile.d/autojump.sh or ~/.autojump/etc/profile.d/autojump.zsh
add shell file of autojump file in ~/.zshrc

...
[[ -s ~/.autojump/etc/profile.d/autojump.zsh ]] && . ~/.autojump/etc/profile.d/autojump.zsh

 

4. reload config file

source ~/.zshrc

 

5. Now Jump it!!

 

分類
zsh

How to install zsh(zshell) and oh-my-zsh on Ubuntu

1.Install zsh

$ sudo apt-get install zsh

2.Install oh-my-zsh

$ wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

若發生以下錯誤訊息代表目前電腦不信任 git 伺服器憑證。該憑證是自行簽署的或是其他未知的機構簽署。

fatal: unable to access 'https://github.com/ohmyzsh/ohmyzsh.git/': server certificate verification failed. CAfile: none CRLfile: none
Error: git clone of oh-my-zsh repo failed

可以使用以下指令暫時忽略憑證

export GIT_SSL_NO_VERIFY=1

3.Now you can modify config file of zsh at

~/.zshrc