|
|
@ -19,61 +19,23 @@ if [[ "$TERM" == 'dumb' ]]; then
|
|
|
|
zstyle ':omz:prompt' theme 'off'
|
|
|
|
zstyle ':omz:prompt' theme 'off'
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Get enabled modules.
|
|
|
|
|
|
|
|
zstyle -a ':omz:load' module 'omodules'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add functions to fpath.
|
|
|
|
|
|
|
|
fpath=(
|
|
|
|
|
|
|
|
${0:h}/themes/*(/FN)
|
|
|
|
|
|
|
|
${omodules:+${0:h}/modules/${^omodules}/{functions,completions}(/FN)}
|
|
|
|
|
|
|
|
$fpath
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Load and initialize the completion system ignoring insecure directories.
|
|
|
|
|
|
|
|
autoload -Uz compinit && compinit -i
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Source files (the order matters).
|
|
|
|
|
|
|
|
source "${0:h}/helper.zsh"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Autoload Zsh functions.
|
|
|
|
# Autoload Zsh functions.
|
|
|
|
autoload -Uz age
|
|
|
|
autoload -Uz age
|
|
|
|
autoload -Uz zargs
|
|
|
|
autoload -Uz zargs
|
|
|
|
autoload -Uz zcalc
|
|
|
|
autoload -Uz zcalc
|
|
|
|
autoload -Uz zmv
|
|
|
|
autoload -Uz zmv
|
|
|
|
|
|
|
|
|
|
|
|
# Source modules defined in ~/.zshrc.
|
|
|
|
# Source files (the order matters).
|
|
|
|
for omodule in "$omodules[@]"; do
|
|
|
|
source "${0:h}/helper.zsh"
|
|
|
|
if [[ ! -d "${0:h}/modules/$omodule" ]]; then
|
|
|
|
|
|
|
|
print "omz: no such module: $omodule" >&2
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -f "${0:h}/modules/$omodule/init.zsh" ]]; then
|
|
|
|
# Get enabled modules.
|
|
|
|
source "${0:h}/modules/$omodule/init.zsh"
|
|
|
|
zstyle -a ':omz:module' enable 'omodules'
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (( $? == 0 )); then
|
|
|
|
# Source modules defined in ~/.zshrc.
|
|
|
|
zstyle ":omz:module:$omodule" enable 'yes'
|
|
|
|
omodload "$omodules[@]"
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
unset omodule omodules
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Autoload Oh My Zsh functions.
|
|
|
|
# Add themes to fpath.
|
|
|
|
for fdir in "$fpath[@]"; do
|
|
|
|
fpath=(${0:h}/themes/*(/FN) $fpath)
|
|
|
|
if [[ "$fdir" == ${0:h}/(|*/)functions ]]; then
|
|
|
|
|
|
|
|
for func in $fdir/[^_.]*(N.:t); do
|
|
|
|
|
|
|
|
autoload -Uz $func
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
unset fdir func
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set environment variables for launchd processes.
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" == darwin* ]]; then
|
|
|
|
|
|
|
|
for env_var in PATH MANPATH; do
|
|
|
|
|
|
|
|
launchctl setenv "$env_var" "${(P)env_var}" &!
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
unset env_var
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Load and run the prompt theming system.
|
|
|
|
# Load and run the prompt theming system.
|
|
|
|
autoload -Uz promptinit && promptinit
|
|
|
|
autoload -Uz promptinit && promptinit
|
|
|
@ -87,6 +49,14 @@ else
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
unset prompt_argv
|
|
|
|
unset prompt_argv
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set environment variables for launchd processes.
|
|
|
|
|
|
|
|
if [[ "$OSTYPE" == darwin* ]]; then
|
|
|
|
|
|
|
|
for env_var in PATH MANPATH; do
|
|
|
|
|
|
|
|
launchctl setenv "$env_var" "${(P)env_var}" &!
|
|
|
|
|
|
|
|
done
|
|
|
|
|
|
|
|
unset env_var
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
# Compile the completion dump, to increase startup speed.
|
|
|
|
# Compile the completion dump, to increase startup speed.
|
|
|
|
dump_file="$HOME/.zcompdump"
|
|
|
|
dump_file="$HOME/.zcompdump"
|
|
|
|
if [[ "$dump_file" -nt "${dump_file}.zwc" || ! -f "${dump_file}.zwc" ]]; then
|
|
|
|
if [[ "$dump_file" -nt "${dump_file}.zwc" || ! -f "${dump_file}.zwc" ]]; then
|
|
|
|