A plugin manager for zsh, inspired by antigen.
A plugin manager for zsh, inspired by antigen
sudo aptitude install zsh # for ubuntu
sudo chsh -s zsh
git clone https://github.com/yanyingwang/.zsh.git $HOME/.zsh && \
echo '$HOME/.zsh/zshrc' >> $HOME/.zshrc
Open a new terminal and wait for a second, everything will be setted.
my own zsh conf file is written by using this plugin manager, you can have a check at: https://github.com/yanyingwang/.zsh
/home/user/zsh/
|---zshrc
|---bundle
|-----antibody
| \------antibody.zsh
|
|-----oh-my-zsh
| |--------plugins/*
| |--------themes/*
|
|----github-zsh-users-zsh-syntax-highlighting
|----other plugins
Just like Vim plugin managers, Antibody puts itself and other plugins into “bundle” directory, config zshell through zshrc file.
Puts code below to zshrc file to auto clone Antibody for the first time.
cd ${0:a:h}
# auto pull in antibody
[[ ! -d bundle ]] && mkdir bundle
[[ ! -d bundle/antibody ]] && git clone https://github.com/yanyingwang/antibody.git bundle/antibody
Puts code below to zshrc file to get it working
source bundle/antibody/antibody.zsh
antibody help
After source antibody.zsh
, you can type antibody help
in your terminal to view antibody manual.
antibody github username/repo
You can use Antibody with github repo plugin, just add code antibody github usename/repo
to your zshrc, Antibody will clone repo if it doesn’t exist.
Note: When using github repo plugins, be note that Antibody is only source three kinds of files: repo_name.zsh, whatever.plugin.zsh, whatever.theme.zsh.
For example, there is a zsh plugin waga, links is https://github.com/yanyingwang/waga, and we should wirte code antibody github yanyingwang/waga
to zshrc
to get ‘waga’ plugin working.
In this example, Antibody will source file waga.zsh
in waga plugin. And if there is a ‘test.plugin.zsh’ or ‘test.theme.zsh’, Antibody will source it, too.
You can use oh-my-zsh’s themes and plugins.
In the condition, Antibody will clone the whole oh-my-zsh repo to local bundle directory, but you can just use one plugin of it.
antibody oh-my-zsh theme robbyrussell
For example, I want to use ‘robbyrussell’ theme, just add code antibody oh-my-zsh theme robbyrussel
to ‘zshrc’.
antibody oh-my-zsh git
antibody oh-my-zsh git rails
You can add mutiple plugin in one line, just add plugin at end of the code.
You can write you own plugin and put it to your github, and ensure there is a ‘repo_name.zsh’ or ‘whatever.plugin.zsh’ or ‘whatever.theme.zsh’ at the root of your repo direcotry.
Then, just add antibody github your_github_usename/your_plugin_repo_name
to ‘zshrc’.