Skip to content

Commit

Permalink
fix(init): fix definition order for $ZSH_CUSTOM
Browse files Browse the repository at this point in the history
  • Loading branch information
mcornella authored and ttelford committed Jun 26, 2024
1 parent 05c82b1 commit 09637ae
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions oh-my-zsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ omz_f() {
unset -f omz_f

# If ZSH is not defined, use the current script's directory.
[[ -z "$ZSH" ]] && export ZSH="${${(%):-%x}:a:h}"
[[ -n "$ZSH" ]] || export ZSH="${${(%):-%x}:a:h}"

# Set ZSH_CUSTOM to the path where your custom config files
# and plugins exists, or else we will use the default custom/
[[ -n "$ZSH_CUSTOM" ]] || ZSH_CUSTOM="$ZSH/custom"

# Set ZSH_CACHE_DIR to the path where cache files should be created
# or else we will use the default cache/
if [[ -z "$ZSH_CACHE_DIR" ]]; then
ZSH_CACHE_DIR="$ZSH/cache"
fi
[[ -n "$ZSH_CACHE_DIR" ]] || ZSH_CACHE_DIR="$ZSH/cache"

# Make sure $ZSH_CACHE_DIR is writable, otherwise use a directory in $HOME
if [[ ! -w "$ZSH_CACHE_DIR" ]]; then
Expand All @@ -76,12 +78,6 @@ fpath=($ZSH/{functions,completions} $ZSH_CUSTOM/{functions,completions} $fpath)
# Load all stock functions (from $fpath files) called below.
autoload -U compaudit compinit zrecompile

# Set ZSH_CUSTOM to the path where your custom config files
# and plugins exists, or else we will use the default custom/
if [[ -z "$ZSH_CUSTOM" ]]; then
ZSH_CUSTOM="$ZSH/custom"
fi

is_plugin() {
local base_dir=$1
local name=$2
Expand Down

0 comments on commit 09637ae

Please sign in to comment.