1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-29 09:10:07 +00:00

znt: more optimizing workarounds for 5.0.6 <= zsh < 5.2

This commit is contained in:
Sebastian Gniazdowski 2015-12-15 09:35:29 +01:00
parent 357d57c541
commit d30a501b1c
2 changed files with 7 additions and 3 deletions

View file

@ -105,7 +105,7 @@ colorize output of the tools, via their config files (check out e.g. n-cd.conf,
it uses this). it uses this).
## Performance ## Performance
ZNT are fastest with Zsh before 5.0.8 and starting from 5.2 ZNT are fastest with Zsh before 5.0.6 and starting from 5.2
vim:filetype=conf vim:filetype=conf

View file

@ -243,7 +243,9 @@ while (( 1 )); do
# Take all elements, including duplicates and non-selectables # Take all elements, including duplicates and non-selectables
typeset +U list typeset +U list
repeat 1; do
list=( "$@" ) list=( "$@" )
done
# Remove non-selectable elements # Remove non-selectable elements
[ "$#NLIST_NONSELECTABLE_ELEMENTS" -gt 0 ] && for i in "${(nO)NLIST_NONSELECTABLE_ELEMENTS[@]}"; do [ "$#NLIST_NONSELECTABLE_ELEMENTS" -gt 0 ] && for i in "${(nO)NLIST_NONSELECTABLE_ELEMENTS[@]}"; do
@ -309,7 +311,9 @@ while (( 1 )); do
# Take all elements, including duplicates and non-selectables # Take all elements, including duplicates and non-selectables
typeset +U list typeset +U list
repeat 1; do
list=( "$@" ) list=( "$@" )
done
# Remove non-selectable elements only when in uniq mode # Remove non-selectable elements only when in uniq mode
[ "$NLIST_IS_UNIQ_MODE" -eq 1 ] && [ "$#NLIST_NONSELECTABLE_ELEMENTS" -gt 0 ] && [ "$NLIST_IS_UNIQ_MODE" -eq 1 ] && [ "$#NLIST_NONSELECTABLE_ELEMENTS" -gt 0 ] &&