Parent directory

znt-history-widget

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