mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
znt: optimizations for zsh<=5.2, use $BUFFER if cmd is not from history
This commit is contained in:
parent
d30a501b1c
commit
77f93f61c5
7 changed files with 25 additions and 12 deletions
|
|
@ -1,7 +1,11 @@
|
|||
autoload znt-usetty-wrapper n-history
|
||||
local NLIST_START_IN_SEARCH_MODE=1
|
||||
local NLIST_START_IN_UNIQ_MODE=1
|
||||
local NLIST_SET_SEARCH_TO="$BUFFER"
|
||||
|
||||
# Only if current $BUFFER doesn't come from history
|
||||
if [ "$HISTCMD" = "$HISTNO" ]; then
|
||||
local NLIST_SET_SEARCH_TO="$BUFFER"
|
||||
fi
|
||||
|
||||
znt-usetty-wrapper n-history "$@"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue