refactor(shell): collapse managed tree back into stubs

Drop ~/.config/zsh/{env,interactive,login} modules. PATH and local.zsh
live in .zshenv; interactive UX is a single .zshrc again. Deploy only
installs the three stubs and removes obsolete trees/examples.
This commit is contained in:
Jeffrey
2026-08-06 14:46:56 +08:00
parent 7f80bb66e1
commit e5e2801ce8
12 changed files with 225 additions and 379 deletions
+4 -8
View File
@@ -243,7 +243,7 @@ fi
ZSH="$HOME/.oh-my-zsh"
EASYZSH_RAW_BASE="${EASYZSH_RAW_BASE:-https://git.miomio.moe/mio/easyzsh/raw/branch/master}"
# Stage managed shell layout (stubs + ~/.config/zsh modules), then deploy.sh installs it.
# Stage shell stubs, then deploy.sh installs them.
# On download failure, leave existing ~/.zshrc and ~/.zshenv untouched.
easyzsh_stage=$(mktemp -d "$HOME/.easyzsh-stage.XXXXXX")
zshrc_download=$(mktemp "$HOME/.zshrc.download.XXXXXX")
@@ -260,16 +260,12 @@ download_easyzsh_file() {
fi
}
echo -e "Downloading easyzsh shell layout\n"
echo -e "Downloading easyzsh shell stubs\n"
for rel in \
deploy.sh \
.zshenv \
.zshrc \
.zprofile \
config/env/00-path.zsh \
config/interactive/10-bootstrap.zsh \
config/interactive/20-post-omz.zsh \
local.zsh.example
.zprofile
do
download_easyzsh_file "$rel"
done
@@ -286,7 +282,7 @@ else
git clone --depth=1 https://github.com/ohmyzsh/ohmyzsh.git "$ZSH"
fi
# deploy.sh backs up existing stubs and never overwrites ~/.config/zsh/local/
# deploy.sh backs up existing stubs and never overwrites ~/.config/zsh/local.zsh
bash "$easyzsh_stage/deploy.sh" --migrate-zprofile
trap - EXIT
rm -rf "$easyzsh_stage"