You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.1 KiB
44 lines
1.1 KiB
# |
|
# Initializes Prezto. |
|
# |
|
# Authors: |
|
# Sorin Ionescu <sorin.ionescu@gmail.com> |
|
# |
|
|
|
# Check for the minimum supported version. |
|
min_zsh_version='4.3.10' |
|
if ! autoload -Uz is-at-least || ! is-at-least "$min_zsh_version"; then |
|
print "prezto: old shell detected, minimum required: $min_zsh_version" >&2 |
|
return 1 |
|
fi |
|
unset min_zsh_version |
|
|
|
# Source the Prezto configuration file. |
|
if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then |
|
source "${ZDOTDIR:-$HOME}/.zpreztorc" |
|
fi |
|
|
|
# Disable color and theme in dumb terminals. |
|
if [[ "$TERM" == 'dumb' ]]; then |
|
zstyle ':prezto:*:*' color 'no' |
|
zstyle ':prezto:module:prompt' theme 'off' |
|
fi |
|
|
|
# Load Zsh modules. |
|
zstyle -a ':prezto:load' zmodule 'zmodules' |
|
for zmodule ("$zmodules[@]") zmodload "zsh/${(z)zmodule}" |
|
unset zmodule{s,} |
|
|
|
# Autoload Zsh functions. |
|
zstyle -a ':prezto:load' zfunction 'zfunctions' |
|
for zfunction ("$zfunctions[@]") autoload -Uz "$zfunction" |
|
unset zfunction{s,} |
|
|
|
# Source files (the order matters). |
|
source "${0:h}/helper.zsh" |
|
|
|
# Load Prezto modules. |
|
zstyle -a ':prezto:load' pmodule 'pmodules' |
|
pmodload "$pmodules[@]" |
|
unset pmodules |
|
|
|
|