From: Alexander Barton Date: Sat, 26 Dec 2020 19:59:09 +0000 (+0100) Subject: 01_zprofile.zshrc: Don't duplicate code, call axzsh_handle_stage() X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=f092bf23d1017fb4532df95551485154c396a8e7;hp=46a0db28766d805d1a838cb6ee53e79566b4512e;p=ax-zsh.git 01_zprofile.zshrc: Don't duplicate code, call axzsh_handle_stage() --- diff --git a/core/01_zprofile/01_zprofile.zshrc b/core/01_zprofile/01_zprofile.zshrc index 93a423d..7260cb6 100644 --- a/core/01_zprofile/01_zprofile.zshrc +++ b/core/01_zprofile/01_zprofile.zshrc @@ -11,28 +11,7 @@ unset PS1 [[ -n "$AXZSH_DEBUG" ]] && echo "» 01_zprofile.zsh:" -if [[ -r "$AXZSH/cache/zprofile.cache" ]]; then - # Cache file exists, use it! - [[ -n "$AXZSH_DEBUG" ]] \ - && echo " - Reading cache file \"$AXZSH/cache/zprofile.cache\" ..." - source "$AXZSH/cache/zprofile.cache" -else - # No cache file, so read plugins manually. The "plugin_list" can be - # empty, when the "zshrc" stage has been read in using the cache file, - # but there is no cache file for the "zprofile" stage. In that case - # the "plugin_list" must be assembled right now (see "ax.zsh" file!): - if [[ -z "$plugin_list" ]]; then - typeset -U plugin_list - plugin_list=( - "$AXZSH/core/"[0-5]* - "$AXZSH/active_plugins/"*(N) - "$AXZSH/core/"[6-9]* - ) - fi - for plugin ($plugin_list); do - axzsh_load_plugin "$plugin" "zprofile" - done -fi +axzsh_handle_stage "01_zprofile.zsh" "zprofile" AXZSH_ZPROFILE_READ=2 [[ -n "$AXZSH_DEBUG" ]] && echo "» 01_zprofile.zsh (end)"