瀏覽代碼

feat(install): respect ZDOTDIR for zsh config detection (#8511)

Signed-off-by: sami <[email protected]>
Samiul Islam 1 月之前
父節點
當前提交
4d08123ca0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      install

+ 1 - 1
install

@@ -369,7 +369,7 @@ case $current_shell in
         config_files="$HOME/.config/fish/config.fish"
         config_files="$HOME/.config/fish/config.fish"
     ;;
     ;;
     zsh)
     zsh)
-        config_files="$HOME/.zshrc $HOME/.zshenv $XDG_CONFIG_HOME/zsh/.zshrc $XDG_CONFIG_HOME/zsh/.zshenv"
+        config_files="${ZDOTDIR:-$HOME}/.zshrc ${ZDOTDIR:-$HOME}/.zshenv $XDG_CONFIG_HOME/zsh/.zshrc $XDG_CONFIG_HOME/zsh/.zshenv"
     ;;
     ;;
     bash)
     bash)
         config_files="$HOME/.bashrc $HOME/.bash_profile $HOME/.profile $XDG_CONFIG_HOME/bash/.bashrc $XDG_CONFIG_HOME/bash/.bash_profile"
         config_files="$HOME/.bashrc $HOME/.bash_profile $HOME/.profile $XDG_CONFIG_HOME/bash/.bashrc $XDG_CONFIG_HOME/bash/.bash_profile"