mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-23 12:51:58 +00:00
fix(init): fix definition order for $ZSH_CUSTOM
Tipped about this in https://github.com/ohmyzsh/ohmyzsh/commit/6754b7e67#commitcomment-143280115
This commit is contained in:
parent
c432ca0993
commit
a87e9c715b
1 changed files with 6 additions and 10 deletions
16
oh-my-zsh.sh
16
oh-my-zsh.sh
|
@ -48,13 +48,15 @@ omz_f() {
|
||||||
unset -f omz_f
|
unset -f omz_f
|
||||||
|
|
||||||
# If ZSH is not defined, use the current script's directory.
|
# 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
|
# Set ZSH_CACHE_DIR to the path where cache files should be created
|
||||||
# or else we will use the default cache/
|
# or else we will use the default cache/
|
||||||
if [[ -z "$ZSH_CACHE_DIR" ]]; then
|
[[ -n "$ZSH_CACHE_DIR" ]] || ZSH_CACHE_DIR="$ZSH/cache"
|
||||||
ZSH_CACHE_DIR="$ZSH/cache"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make sure $ZSH_CACHE_DIR is writable, otherwise use a directory in $HOME
|
# Make sure $ZSH_CACHE_DIR is writable, otherwise use a directory in $HOME
|
||||||
if [[ ! -w "$ZSH_CACHE_DIR" ]]; then
|
if [[ ! -w "$ZSH_CACHE_DIR" ]]; then
|
||||||
|
@ -76,12 +78,6 @@ fpath=($ZSH/{functions,completions} $ZSH_CUSTOM/{functions,completions} $fpath)
|
||||||
# Load all stock functions (from $fpath files) called below.
|
# Load all stock functions (from $fpath files) called below.
|
||||||
autoload -U compaudit compinit zrecompile
|
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() {
|
is_plugin() {
|
||||||
local base_dir=$1
|
local base_dir=$1
|
||||||
local name=$2
|
local name=$2
|
||||||
|
|
Loading…
Reference in a new issue