Add zplugin to zsh steps (#265)
This commit is contained in:
committed by
Roey Darwish Dror
parent
68a9c1c7cb
commit
ccc09a6ee9
@@ -314,6 +314,12 @@ fn run() -> Result<(), Error> {
|
||||
|| zsh::run_zplug(&base_dirs, run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
execute(
|
||||
&mut report,
|
||||
"zplugin",
|
||||
|| zsh::run_zplugin(&base_dirs, run_type),
|
||||
config.no_retry(),
|
||||
)?;
|
||||
execute(
|
||||
&mut report,
|
||||
"oh-my-zsh",
|
||||
|
||||
@@ -55,6 +55,24 @@ pub fn run_zplug(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||
run_type.execute(zsh).args(&["-c", cmd.as_str()]).check_run()
|
||||
}
|
||||
|
||||
pub fn run_zplugin(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||
let zsh = require("zsh")?;
|
||||
let zshrc = zshrc(base_dirs).require()?;
|
||||
|
||||
env::var("ZPLGM[HOME_DIR]")
|
||||
.map(PathBuf::from)
|
||||
.unwrap_or_else(|_| base_dirs.home_dir().join(".zplugin"))
|
||||
.require()?;
|
||||
|
||||
print_separator("zplugin");
|
||||
|
||||
let cmd = format!(
|
||||
"source {} && zplugin self-update && zplugin update --all",
|
||||
zshrc.display()
|
||||
);
|
||||
run_type.execute(zsh).args(&["-c", cmd.as_str()]).check_run()
|
||||
}
|
||||
|
||||
pub fn run_oh_my_zsh(base_dirs: &BaseDirs, run_type: RunType) -> Result<(), Error> {
|
||||
let zsh = require("zsh")?;
|
||||
let zshrc = zshrc(base_dirs).require()?;
|
||||
|
||||
Reference in New Issue
Block a user