Support update of zsh plugin with antibody (#319)

This commit is contained in:
Manuel Hässig
2020-02-11 06:57:30 +01:00
committed by GitHub
parent 22a27ed2c5
commit fea896da1d
3 changed files with 11 additions and 0 deletions

View File

@@ -214,6 +214,7 @@ fn run() -> Result<()> {
{
if config.should_run(Step::Shell) {
runner.execute("zr", || zsh::run_zr(&base_dirs, run_type))?;
runner.execute("antibody", || zsh::run_antibody(run_type))?;
runner.execute("antigen", || zsh::run_antigen(&base_dirs, run_type))?;
runner.execute("zplug", || zsh::run_zplug(&base_dirs, run_type))?;
runner.execute("zplugin", || zsh::run_zplugin(&base_dirs, run_type))?;

View File

@@ -26,6 +26,15 @@ pub fn zshrc(base_dirs: &BaseDirs) -> PathBuf {
.unwrap_or_else(|_| base_dirs.home_dir().join(".zshrc"))
}
pub fn run_antibody(run_type: RunType) -> Result<()> {
require("zsh")?;
let antibody = require("antibody")?;
print_separator("antibody");
run_type.execute(antibody).arg("update").check_run()
}
pub fn run_antigen(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
let zsh = require("zsh")?;
let zshrc = zshrc(base_dirs).require()?;