LoginSignup
23
28

More than 5 years have passed since last update.

`zplug` と `prezto` を install してみた。

Last updated at Posted at 2016-08-03

plugin manager の選択

zsh の plugin manager には antigen , antibody , zgen ... といくつかあるようですが、そのなかで zplug が良さそうだと判断しました。 作者のドキュメント http://blog.b4b4r07.com/entry/2015/12/13/174209 がわかりやすかったので、これなら私でもできそうだと思ったわけです。

zplug の install

https://github.com/zplug/zplug の README.md を読むと、 install の 「 The best way 」として

$ curl -sL zplug.sh/installer | zsh

と書かれています。この 1 行を zsh にcopy & paste して enter を叩いたら install できました。簡単です。

prezto の clone

.zshrc に、以下の記述を加えます:

source ~/.zplug/init.zsh

zplug "sorin-ionescu/prezto"

zplug load --verbose

そうしたら、 zsh を再起動して、

$ zplug install

と叩きます。これで、 prezto の repository が $HOME/.zplug/repos/sorin-ionescu/prezto に clone されます。

prezto の install の準備

ここで preztoREADME.md https://github.com/sorin-ionescu/prezto を見てみましょう。

Clone the repository:

git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"

と書いてありますね。標準では $HOME/.zprezto に clone することを想定しているわけです。いま我々は $HOME/.zplug/repos/sorin-ionescu/prezto に clone したので、 symbolic link を張ってやりましょう。

$ ln -s $HOME/.zplug/repos/sorin-ionescu/prezto $HOME/.zprezto

で OK です。

また、ここからの手順で、 .zshrc, .zlogin, .zlogout, .zprofile, .zshenv が overwrite されてしまうので、必要に応じ退避しておきます。

prezto の install

README.md https://github.com/sorin-ionescu/prezto に従い、

setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
  ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}"
done

を実行します。これで完了します。 zsh を再起動すると prompt がきれいになっているはずです。

参考

おい、Antigen もいいけど zplug 使えよ
http://qiita.com/b4b4r07/items/cd326cd31e01955b788b

23
28
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
23
28