diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-12-15 11:03:14 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-12-15 11:03:14 +0100 |
commit | cb11d139b4190a27b049751b67e762e29a801fc5 (patch) | |
tree | 007eb0c976f760fa839147e7d1fa979016e64163 /plugins/zsh-navigation-tools/n-list | |
parent | 5de1704a0a5d483d15528a72a3be60d44356b686 (diff) | |
parent | d30a501b1c6b8e8164b266318e26ce6d2e4719cf (diff) | |
download | zsh-cb11d139b4190a27b049751b67e762e29a801fc5.tar.gz zsh-cb11d139b4190a27b049751b67e762e29a801fc5.tar.bz2 zsh-cb11d139b4190a27b049751b67e762e29a801fc5.zip |
Merge pull request #4697 from psprint/master
znt: more optimizing workarounds for 5.0.6 <= zsh < 5.2
Diffstat (limited to 'plugins/zsh-navigation-tools/n-list')
-rw-r--r-- | plugins/zsh-navigation-tools/n-list | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/zsh-navigation-tools/n-list b/plugins/zsh-navigation-tools/n-list index d13e048bf..388712bd0 100644 --- a/plugins/zsh-navigation-tools/n-list +++ b/plugins/zsh-navigation-tools/n-list @@ -243,7 +243,9 @@ while (( 1 )); do # Take all elements, including duplicates and non-selectables typeset +U list - list=( "$@" ) + repeat 1; do + list=( "$@" ) + done # Remove non-selectable elements [ "$#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 typeset +U list - list=( "$@" ) + repeat 1; do + list=( "$@" ) + done # Remove non-selectable elements only when in uniq mode [ "$NLIST_IS_UNIQ_MODE" -eq 1 ] && [ "$#NLIST_NONSELECTABLE_ELEMENTS" -gt 0 ] && |