My current widget associated with downkey looks like the following: down-line-or-select() { if [[ $RBUFFER == *$'\n'* ]]; then zle down-line else zle menu-select -w fi } zle -N down-line-or-select bindkey $terminfo[kcud1] down-line-or-select # down arrow How can I integrate `history-substring-search-down` with this?