about summary refs log tree commit diff
path: root/Functions/Zle/down-line-or-beginning-search
blob: 881150171fc710ecda137291bea5a70b1ab2bbc4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Like down-line-or-search, but uses the whole line prefix up to the
# cursor position for searching forwards.

if [[ $LASTWIDGET != $WIDGET ]]
then
    if [[ $LBUFFER == *$'\n'* ]]
    then
        __last_down_line=down-line-or-history
    else
        __last_down_line=history-beginning-search-forward
    fi
fi
zle .${__last_down_line:-beep}