mirror of
https://github.com/r-darwish/topgrade
synced 2024-07-08 20:16:24 +00:00
Add zgenom zsh plugin manager (#862)
- add the required functionality for zgenom - fix the env::var for zinit - it should be ZINIT_HOME, not ZBXF, as this is also set in zgenom, but makes topgrade fail when zinit is not installed Co-authored-by: Sven Hergenhahn <sven.hergenhahn@dm.de>
This commit is contained in:
parent
cea32020ce
commit
afa3171d99
|
@ -257,6 +257,7 @@ fn run() -> Result<()> {
|
|||
runner.execute(Step::Shell, "zr", || zsh::run_zr(&base_dirs, run_type))?;
|
||||
runner.execute(Step::Shell, "antibody", || zsh::run_antibody(run_type))?;
|
||||
runner.execute(Step::Shell, "antigen", || zsh::run_antigen(&base_dirs, run_type))?;
|
||||
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, "zim", || zsh::run_zim(&base_dirs, run_type))?;
|
||||
|
|
|
@ -51,6 +51,20 @@ pub fn run_antigen(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
|||
run_type.execute(zsh).args(&["-l", "-c", cmd.as_str()]).check_run()
|
||||
}
|
||||
|
||||
pub fn run_zgenom(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||
let zsh = require("zsh")?;
|
||||
let zshrc = zshrc(base_dirs).require()?;
|
||||
env::var("ZGEN_SOURCE")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| base_dirs.home_dir().join(".zgenom"))
|
||||
.require()?;
|
||||
|
||||
print_separator("zgenom");
|
||||
|
||||
let cmd = format!("source {} && zgenom selfupdate && zgenom update", zshrc.display());
|
||||
run_type.execute(zsh).args(&["-l", "-c", cmd.as_str()]).check_run()
|
||||
}
|
||||
|
||||
pub fn run_zplug(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
||||
let zsh = require("zsh")?;
|
||||
zshrc(base_dirs).require()?;
|
||||
|
@ -69,7 +83,7 @@ pub fn run_zinit(base_dirs: &BaseDirs, run_type: RunType) -> Result<()> {
|
|||
let zsh = require("zsh")?;
|
||||
let zshrc = zshrc(base_dirs).require()?;
|
||||
|
||||
env::var("ZPFX")
|
||||
env::var("ZINIT_HOME")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| base_dirs.home_dir().join(".zinit"))
|
||||
.require()?;
|
||||
|
|
Loading…
Reference in New Issue
Block a user