]> src.twobees.de Git - dotfiles.git/blob - stow/oh-my-zsh/.oh-my-zsh/plugins/zsh-navigation-tools/znt-history-widget
479c2211bfd4a308f85f3b89c459f932f7cf4d37
[dotfiles.git] / stow / oh-my-zsh / .oh-my-zsh / plugins / zsh-navigation-tools / znt-history-widget
1 autoload znt-usetty-wrapper n-history
2 local NLIST_START_IN_SEARCH_MODE=1
3 local NLIST_START_IN_UNIQ_MODE=1
4
5 # Only if current $BUFFER doesn't come from history
6 if [ "$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"
16 fi
17
18 znt-usetty-wrapper n-history "$@"
19
20 unset NLIST_START_IN_SEARCH_MODE
21 unset NLIST_START_IN_UNIQ_MODE
22 unset NLIST_SET_SEARCH_TO