|
|
@ -1,5 +1,8 @@
|
|
|
|
# Initializes Oh My Zsh.
|
|
|
|
# Initializes Oh My Zsh.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Set the path to OMZ.
|
|
|
|
|
|
|
|
export OMZ="${0:h}"
|
|
|
|
|
|
|
|
|
|
|
|
# Check for the minimum supported version.
|
|
|
|
# Check for the minimum supported version.
|
|
|
|
min_zsh_version='4.3.10'
|
|
|
|
min_zsh_version='4.3.10'
|
|
|
|
if ! autoload -Uz is-at-least || ! is-at-least "$min_zsh_version"; then
|
|
|
|
if ! autoload -Uz is-at-least || ! is-at-least "$min_zsh_version"; then
|
|
|
@ -18,9 +21,9 @@ zstyle -a ':omz:load' plugin 'plugins'
|
|
|
|
|
|
|
|
|
|
|
|
# Add functions to fpath.
|
|
|
|
# Add functions to fpath.
|
|
|
|
fpath=(
|
|
|
|
fpath=(
|
|
|
|
${0:h}/themes/*(/FN)
|
|
|
|
${OMZ}/themes/*(/FN)
|
|
|
|
${plugins:+${0:h}/plugins/${^plugins}/{functions,completions}(/FN)}
|
|
|
|
${plugins:+${OMZ}/plugins/${^plugins}/{functions,completions}(/FN)}
|
|
|
|
${0:h}/{functions,completions}(/FN)
|
|
|
|
${OMZ}/{functions,completions}(/FN)
|
|
|
|
$fpath
|
|
|
|
$fpath
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
@ -28,16 +31,16 @@ fpath=(
|
|
|
|
autoload -Uz compinit && compinit -i
|
|
|
|
autoload -Uz compinit && compinit -i
|
|
|
|
|
|
|
|
|
|
|
|
# Source files (the order matters).
|
|
|
|
# Source files (the order matters).
|
|
|
|
source "${0:h}/helper.zsh"
|
|
|
|
source "${OMZ}/helper.zsh"
|
|
|
|
source "${0:h}/environment.zsh"
|
|
|
|
source "${OMZ}/environment.zsh"
|
|
|
|
source "${0:h}/terminal.zsh"
|
|
|
|
source "${OMZ}/terminal.zsh"
|
|
|
|
source "${0:h}/keyboard.zsh"
|
|
|
|
source "${OMZ}/keyboard.zsh"
|
|
|
|
source "${0:h}/completion.zsh"
|
|
|
|
source "${OMZ}/completion.zsh"
|
|
|
|
source "${0:h}/history.zsh"
|
|
|
|
source "${OMZ}/history.zsh"
|
|
|
|
source "${0:h}/directory.zsh"
|
|
|
|
source "${OMZ}/directory.zsh"
|
|
|
|
source "${0:h}/alias.zsh"
|
|
|
|
source "${OMZ}/alias.zsh"
|
|
|
|
source "${0:h}/spectrum.zsh"
|
|
|
|
source "${OMZ}/spectrum.zsh"
|
|
|
|
source "${0:h}/utility.zsh"
|
|
|
|
source "${OMZ}/utility.zsh"
|
|
|
|
|
|
|
|
|
|
|
|
# Autoload Zsh functions.
|
|
|
|
# Autoload Zsh functions.
|
|
|
|
autoload -Uz age
|
|
|
|
autoload -Uz age
|
|
|
@ -49,19 +52,19 @@ autoload -Uz zmv
|
|
|
|
for plugin in "$plugins[@]"; do
|
|
|
|
for plugin in "$plugins[@]"; do
|
|
|
|
zstyle ":omz:plugin:$plugin" enable 'yes'
|
|
|
|
zstyle ":omz:plugin:$plugin" enable 'yes'
|
|
|
|
|
|
|
|
|
|
|
|
if [[ ! -d "${0:h}/plugins/$plugin" ]]; then
|
|
|
|
if [[ ! -d "${OMZ}/plugins/$plugin" ]]; then
|
|
|
|
print "omz: no such plugin: $plugin" >&2
|
|
|
|
print "omz: no such plugin: $plugin" >&2
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [[ -f "${0:h}/plugins/$plugin/init.zsh" ]]; then
|
|
|
|
if [[ -f "${OMZ}/plugins/$plugin/init.zsh" ]]; then
|
|
|
|
source "${0:h}/plugins/$plugin/init.zsh"
|
|
|
|
source "${OMZ}/plugins/$plugin/init.zsh"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
unset plugin plugins
|
|
|
|
unset plugin plugins
|
|
|
|
|
|
|
|
|
|
|
|
# Autoload Oh My Zsh functions.
|
|
|
|
# Autoload Oh My Zsh functions.
|
|
|
|
for fdir in "$fpath[@]"; do
|
|
|
|
for fdir in "$fpath[@]"; do
|
|
|
|
if [[ "$fdir" == ${0:h}/(|*/)functions ]]; then
|
|
|
|
if [[ "$fdir" == ${OMZ}/(|*/)functions ]]; then
|
|
|
|
for func in $fdir/[^_.]*(N.:t); do
|
|
|
|
for func in $fdir/[^_.]*(N.:t); do
|
|
|
|
autoload -Uz $func
|
|
|
|
autoload -Uz $func
|
|
|
|
done
|
|
|
|
done
|
|
|
|