Skip to content

Commit

Permalink
take ZDOTDIR into account when searching for ZSH shell initialziation…
Browse files Browse the repository at this point in the history
… files, fix #2479
  • Loading branch information
mpapis committed Dec 29, 2013
1 parent 24c16bd commit 7ada8e5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/functions/installer
Original file line number Diff line number Diff line change
Expand Up @@ -981,14 +981,14 @@ setup_user_profile_detect()
{
etc_profile_file="/etc/profile.d/rvm.sh"
search_list_bash=( "$HOME/.bashrc" "$HOME/.bash_profile" "$HOME/.bash_login" )
search_list_zsh=( "$HOME/.zshenv" "$HOME/.zprofile" "$HOME/.zshrc" "$HOME/.zlogin" )
search_list_zsh=( "${ZDOTDIR:-${HOME}}/.zshenv" "${ZDOTDIR:-${HOME}}/.zprofile" "${ZDOTDIR:-${HOME}}/.zshrc" "${ZDOTDIR:-${HOME}}/.zlogin" )
search_list=( "$HOME/.profile" "${search_list_bash[@]}" "${search_list_zsh[@]}" )

target_rc=( "$HOME/.profile" "$HOME/.bashrc" "$HOME/.zshrc" )
target_rc=( "$HOME/.profile" "$HOME/.bashrc" "${ZDOTDIR:-${HOME}}/.zshrc" )

target_login=()
pick_a_file target_login "$HOME/.bash_profile" "$HOME/.bash_login"
target_login+=( "$HOME/.zlogin" )
target_login+=( "${ZDOTDIR:-${HOME}}/.zlogin" )

for profile_file in "${search_list[@]}"
do
Expand Down

0 comments on commit 7ada8e5

Please sign in to comment.