mirror of
https://github.com/zdharma-continuum/history-search-multi-word
synced 2025-02-16 11:08:23 +00:00
Faster startup – use ${(@)history} when search pattern is empty
This commit is contained in:
parent
619c27c2cf
commit
ee0201a91b
1 changed files with 1 additions and 1 deletions
|
@ -82,7 +82,7 @@ _hsmw_main() {
|
|||
repeat 1; do
|
||||
# Tip: these are equal:
|
||||
#__hsmw_hcw_found=( "${(@M)history:#(#i)*$~search_pattern*}" )
|
||||
__hsmw_hcw_found=( "${(@)history[(R)(#i)*$~search_pattern*]}" )
|
||||
[[ -z "$search_pattern" ]] && __hsmw_hcw_found=( ${(@)history} ) || __hsmw_hcw_found=( "${(@)history[(R)(#i)*$~search_pattern*]}" )
|
||||
done
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue