mirror of
https://github.com/zsh-users/zsh-history-substring-search.git
synced 2026-11-11 11:41:49 -05:00
set options and load modules only once at loadtime
This commit is contained in:
committed by
Suraj N. Kurapati
parent
43ab2cd304
commit
d217eff6a1
@@ -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 "\)",
|
||||||
|
|||||||
Reference in New Issue
Block a user