set options and load modules only once at loadtime

This commit is contained in:
Sorin Ionescu 2011-05-26 19:37:15 -07:00 committed by Suraj N. Kurapati
parent 43ab2cd304
commit d217eff6a1

View file

@ -44,13 +44,13 @@
# -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*- # -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
# vim: ft=zsh sw=2 ts=2 et # vim: ft=zsh sw=2 ts=2 et
setopt extendedglob
zmodload -i zsh/parameter
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold' HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold'
HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold' HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'
history-substring-search-begin() { history-substring-search-begin() {
setopt extendedglob
zmodload -i zsh/parameter
if [[ $LASTWIDGET != history-substring-search-* ]]; then if [[ $LASTWIDGET != history-substring-search-* ]]; then
# $BUFFER contains the text that is in the command-line currently. # $BUFFER contains the text that is in the command-line currently.
# we put an extra "\\" before meta characters such as "\(" and "\)", # we put an extra "\\" before meta characters such as "\(" and "\)",