From 87ecc69601007d2a4a799ca75af6b1049b61e5ba Mon Sep 17 00:00:00 2001 From: imbytecat Date: Thu, 2 Apr 2026 20:46:34 +0800 Subject: [PATCH] =?UTF-8?q?refactor(zsh):=20=E7=A7=BB=E9=99=A4=20.zshenv?= =?UTF-8?q?=EF=BC=8CPATH=20=E7=A7=BB=E5=85=A5=20.zshrc=20=E5=B9=B6?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20.zshrc.local?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 .zshenv,PATH 声明合并至 .zshrc 顶部 - 末尾加载 ~/.zshrc.local 用于机密和机器特定配置 - zsh 模块不再声明 .zshenv 文件 --- home/.zshenv | 3 --- home/.zshrc | 7 +++++++ modules/zsh.py | 4 ---- 3 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 home/.zshenv diff --git a/home/.zshenv b/home/.zshenv deleted file mode 100644 index e0387d9..0000000 --- a/home/.zshenv +++ /dev/null @@ -1,3 +0,0 @@ -# PATH -export PATH="$HOME/go/bin:$PATH" -export PATH="$HOME/.bun/bin:$PATH" diff --git a/home/.zshrc b/home/.zshrc index e38e217..6f0bdc2 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -1,3 +1,7 @@ +# PATH +export PATH="$HOME/go/bin:$PATH" +export PATH="$HOME/.bun/bin:$PATH" + # Oh My Zsh ZSH=/usr/share/oh-my-zsh/ ZSH_THEME="ys" @@ -28,3 +32,6 @@ alias ls="eza" alias tree="eza --tree" alias cat="bat --paging=never" alias rm="trash-put" + +# Local overrides (secrets, machine-specific config) +[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local diff --git a/modules/zsh.py b/modules/zsh.py index 1f70745..6fe7639 100644 --- a/modules/zsh.py +++ b/modules/zsh.py @@ -13,10 +13,6 @@ class ZshModule(Module): def files(self): return { - f"/home/{self.user}/.zshenv": File( - source_file="./home/.zshenv", - owner=self.user, - ), f"/home/{self.user}/.zshrc": File( source_file="./home/.zshrc", owner=self.user,