mirror of
https://github.com/r-darwish/topgrade
synced 2024-07-08 20:16:24 +00:00
Add: Add new zsh plugin "zi" (#921)
This commit is contained in:
parent
591f23e2f7
commit
08e8b56b75
|
@ -267,6 +267,7 @@ fn run() -> Result<()> {
|
|||
runner.execute(Step::Shell, "zgenom", || zsh::run_zgenom(&base_dirs, run_type))?;
|
||||
runner.execute(Step::Shell, "zplug", || zsh::run_zplug(&base_dirs, run_type))?;
|
||||
runner.execute(Step::Shell, "zinit", || zsh::run_zinit(&base_dirs, run_type))?;
|
||||
runner.execute(Step::Shell, "zi", || zsh::run_zi(&base_dirs, run_type))?;
|
||||
runner.execute(Step::Shell, "zim", || zsh::run_zim(&base_dirs, run_type))?;
|
||||
runner.execute(Step::Shell, "oh-my-zsh", || zsh::run_oh_my_zsh(&ctx))?;
|
||||
runner.execute(Step::Shell, "fisher", || unix::run_fisher(&base_dirs, run_type))?;
|
||||
|
|
|
@ -94,6 +94,21 @@ pub fn run_zinit(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
|||
run_type.execute(zsh).args(&["-i", "-c", cmd.as_str()]).check_run()
|
||||
}
|
||||
|
||||
pub fn run_zi(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||
let zsh = require("zsh")?;
|
||||
let zshrc = zshrc(base_dirs).require()?;
|
||||
|
||||
env::var("ZPFX")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| base_dirs.home_dir().join(".zi"))
|
||||
.require()?;
|
||||
|
||||
print_separator("zi");
|
||||
|
||||
let cmd = format!("source {} && zi self-update && zi update --all", zshrc.display(),);
|
||||
run_type.execute(zsh).args(["-i", "-c", &cmd]).check_run()
|
||||
}
|
||||
|
||||
pub fn run_zim(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||
let zsh = require("zsh")?;
|
||||
env::var("ZIM_HOME")
|
||||
|
|
Loading…
Reference in New Issue
Block a user