1 autoload znt-usetty-wrapper n-history
2 local NLIST_START_IN_SEARCH_MODE=1
3 local NLIST_START_IN_UNIQ_MODE=1
5 # Only if current $BUFFER doesn't come from history
6 if [ "$HISTCMD" = "$HISTNO" ]; then
8 setopt localoptions extendedglob
9 local -a match mbegin mend
10 local MATCH; integer MBEGIN MEND
12 [ -n "$BUFFER" ] && BUFFER="${BUFFER%% ##} "
15 local NLIST_SET_SEARCH_TO="$BUFFER"
18 znt-usetty-wrapper n-history "$@"
20 unset NLIST_START_IN_SEARCH_MODE
21 unset NLIST_START_IN_UNIQ_MODE
22 unset NLIST_SET_SEARCH_TO