1
0
Fork 0

Check minimum required zsh version in modules and dont return from the main init

This commit is contained in:
Ben O'Hara 2012-06-17 14:33:13 +10:00
parent 00348eca51
commit 1cb064898f
5 changed files with 29 additions and 2 deletions
init.zsh
modules
editor
history-substring-search
syntax-highlighting
terminal

View file

@ -7,10 +7,9 @@
# #
# Check for the minimum supported version. # Check for the minimum supported version.
min_zsh_version='4.3.10' min_zsh_version='4.2.6'
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
print "omz: old shell detected, minimum required: $min_zsh_version" >&2 print "omz: old shell detected, minimum required: $min_zsh_version" >&2
return 1
fi fi
unset min_zsh_version unset min_zsh_version

View file

@ -40,6 +40,13 @@
# zstyle ':omz:module:editor' completing '...' # zstyle ':omz:module:editor' completing '...'
# #
# 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
return 1
fi
unset min_zsh_version
# Dumb terminals lack support. # Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then if [[ "$TERM" == 'dumb' ]]; then
return 1 return 1

View file

@ -6,6 +6,13 @@
# Sorin Ionescu <sorin.ionescu@gmail.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
return 1
fi
unset min_zsh_version
source "${0:h}/external/zsh-history-substring-search.zsh" source "${0:h}/external/zsh-history-substring-search.zsh"
if zstyle -t ':omz:module:history-substring-search' case-sensitive; then if zstyle -t ':omz:module:history-substring-search' case-sensitive; then

View file

@ -5,6 +5,13 @@
# Sorin Ionescu <sorin.ionescu@gmail.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
return 1
fi
unset min_zsh_version
if zstyle -t ':omz:module:syntax-highlighting' color; then if zstyle -t ':omz:module:syntax-highlighting' color; then
source "${0:h}/external/zsh-syntax-highlighting.zsh" source "${0:h}/external/zsh-syntax-highlighting.zsh"

View file

@ -6,6 +6,13 @@
# Sorin Ionescu <sorin.ionescu@gmail.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
return 1
fi
unset min_zsh_version
# Dumb terminals lack support. # Dumb terminals lack support.
if [[ "$TERM" == 'dumb' ]]; then if [[ "$TERM" == 'dumb' ]]; then
return 1 return 1