diff options
Diffstat (limited to 'Functions/Zle/down-line-or-beginning-search')
-rw-r--r-- | Functions/Zle/down-line-or-beginning-search | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Functions/Zle/down-line-or-beginning-search b/Functions/Zle/down-line-or-beginning-search new file mode 100644 index 000000000..881150171 --- /dev/null +++ b/Functions/Zle/down-line-or-beginning-search @@ -0,0 +1,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} |