mirror of
https://github.com/zsh-users/zsh-history-substring-search.git
synced 2026-11-11 03:41:47 -05:00
simplify last widget == current widget check
Restored from Peter Stephenson's original version of this plugin: http://www.zsh.org/mla/users/2009/msg00818.html
This commit is contained in:
@@ -47,8 +47,7 @@ history-substring-search-begin() {
|
|||||||
setopt extendedglob
|
setopt extendedglob
|
||||||
zmodload -i zsh/parameter
|
zmodload -i zsh/parameter
|
||||||
|
|
||||||
if [[ ! ( ( ${WIDGET/backward/forward} = ${LASTWIDGET/backward/forward}) ||
|
if [[ $LASTWIDGET != history-substring-search-* ]]; then
|
||||||
( ${WIDGET/forward/backward} = ${LASTWIDGET/forward/backward}) ) ]]; 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 "\)",
|
||||||
# so that they become "\\\|" and "\\\("
|
# so that they become "\\\|" and "\\\("
|
||||||
|
|||||||
Reference in New Issue
Block a user