zplugin was renamed to zinit (#320)
This commit is contained in:
@@ -217,7 +217,7 @@ fn run() -> Result<()> {
|
|||||||
runner.execute("antibody", || zsh::run_antibody(run_type))?;
|
runner.execute("antibody", || zsh::run_antibody(run_type))?;
|
||||||
runner.execute("antigen", || zsh::run_antigen(&base_dirs, run_type))?;
|
runner.execute("antigen", || zsh::run_antigen(&base_dirs, run_type))?;
|
||||||
runner.execute("zplug", || zsh::run_zplug(&base_dirs, run_type))?;
|
runner.execute("zplug", || zsh::run_zplug(&base_dirs, run_type))?;
|
||||||
runner.execute("zplugin", || zsh::run_zplugin(&base_dirs, run_type))?;
|
runner.execute("zinit", || zsh::run_zinit(&base_dirs, run_type))?;
|
||||||
runner.execute("oh-my-zsh", || zsh::run_oh_my_zsh(&base_dirs, run_type))?;
|
runner.execute("oh-my-zsh", || zsh::run_oh_my_zsh(&base_dirs, run_type))?;
|
||||||
runner.execute("fisher", || unix::run_fisher(&base_dirs, run_type))?;
|
runner.execute("fisher", || unix::run_fisher(&base_dirs, run_type))?;
|
||||||
runner.execute("tmux", || tmux::run_tpm(&base_dirs, run_type))?;
|
runner.execute("tmux", || tmux::run_tpm(&base_dirs, run_type))?;
|
||||||
|
|||||||
@@ -64,21 +64,18 @@ pub fn run_zplug(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
|||||||
run_type.execute(zsh).args(&["-l", "-c", cmd.as_str()]).check_run()
|
run_type.execute(zsh).args(&["-l", "-c", cmd.as_str()]).check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn run_zplugin(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
pub fn run_zinit(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||||
let zsh = require("zsh")?;
|
let zsh = require("zsh")?;
|
||||||
let zshrc = zshrc(base_dirs).require()?;
|
let zshrc = zshrc(base_dirs).require()?;
|
||||||
|
|
||||||
env::var("ZPLGM[HOME_DIR]")
|
env::var("ZPFX")
|
||||||
.map(PathBuf::from)
|
.map(PathBuf::from)
|
||||||
.unwrap_or_else(|_| base_dirs.home_dir().join(".zplugin"))
|
.unwrap_or_else(|_| base_dirs.home_dir().join(".zinit"))
|
||||||
.require()?;
|
.require()?;
|
||||||
|
|
||||||
print_separator("zplugin");
|
print_separator("zinit");
|
||||||
|
|
||||||
let cmd = format!(
|
let cmd = format!("source {} && zinit self-update && zinit update --all", zshrc.display());
|
||||||
"source {} && zplugin self-update && zplugin update --all",
|
|
||||||
zshrc.display()
|
|
||||||
);
|
|
||||||
run_type.execute(zsh).args(&["-l", "-c", cmd.as_str()]).check_run()
|
run_type.execute(zsh).args(&["-l", "-c", cmd.as_str()]).check_run()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user