refactor(zsh): 将 PATH 配置提取到 .zshenv

This commit is contained in:
2026-03-26 16:11:52 +08:00
parent 2734133d62
commit a2f3ceb6b5
3 changed files with 7 additions and 3 deletions
+3
View File
@@ -0,0 +1,3 @@
# PATH
export PATH="$HOME/go/bin:$PATH"
export PATH="$HOME/.bun/bin:$PATH"
-3
View File
@@ -11,9 +11,6 @@ source /usr/share/zsh/plugins/fzf-tab-git/fzf-tab.plugin.zsh
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# bun
export PATH="$HOME/.bun/bin:$PATH"
# mise # mise
if command -v mise &> /dev/null; then if command -v mise &> /dev/null; then
eval "$(mise activate zsh)" eval "$(mise activate zsh)"
+4
View File
@@ -11,6 +11,10 @@ class ZshModule(Module):
def files(self): def files(self):
return { return {
f"/home/{self.user}/.zshenv": File(
source_file="./home/.zshenv",
owner=self.user,
),
f"/home/{self.user}/.zshrc": File( f"/home/{self.user}/.zshrc": File(
source_file="./home/.zshrc", source_file="./home/.zshrc",
owner=self.user, owner=self.user,