mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-10-14 07:49:09 +00:00
committed by
Sorin Ionescu
parent
5232191cbe
commit
fb9a20591f
21
init.zsh
21
init.zsh
@@ -1,40 +1,39 @@
|
||||
#
|
||||
# Initializes Oh My Zsh.
|
||||
# Initializes Prezto.
|
||||
#
|
||||
# Authors:
|
||||
# Robby Russell <robby@planetargon.com>
|
||||
# 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 "omz: old shell detected, minimum required: $min_zsh_version" >&2
|
||||
print "prezto: old shell detected, minimum required: $min_zsh_version" >&2
|
||||
return 1
|
||||
fi
|
||||
unset min_zsh_version
|
||||
|
||||
# Disable color and theme in dumb terminals.
|
||||
if [[ "$TERM" == 'dumb' ]]; then
|
||||
zstyle ':omz:*:*' color 'no'
|
||||
zstyle ':omz:module:prompt' theme 'off'
|
||||
zstyle ':prezto:*:*' color 'no'
|
||||
zstyle ':prezto:module:prompt' theme 'off'
|
||||
fi
|
||||
|
||||
# Load Zsh modules.
|
||||
zstyle -a ':omz:load' zmodule 'zmodules'
|
||||
zstyle -a ':prezto:load' zmodule 'zmodules'
|
||||
for zmodule ("$zmodules[@]") zmodload "zsh/${(z)zmodule}"
|
||||
unset zmodule{s,}
|
||||
|
||||
# Autoload Zsh functions.
|
||||
zstyle -a ':omz:load' zfunction 'zfunctions'
|
||||
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"
|
||||
|
||||
# Source modules defined in ~/.zshrc.
|
||||
zstyle -a ':omz:load' omodule 'omodules'
|
||||
omodload "$omodules[@]"
|
||||
unset omodules
|
||||
# Source Prezto modules defined in ~/.zshrc.
|
||||
zstyle -a ':prezto:load' pmodule 'pmodules'
|
||||
pmodload "$pmodules[@]"
|
||||
unset pmodules
|
||||
|
||||
|
Reference in New Issue
Block a user