summaryrefslogtreecommitdiff
path: root/plugins/zsh-navigation-tools/n-panelize
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2015-12-14 00:41:40 +0100
committerMarc Cornellà <marc.cornella@live.com>2015-12-14 00:41:40 +0100
commit273063ad59a9ce125349100647204ef42ad83e1c (patch)
tree3e9db5018f9ef4d7eea2c261139329009d9592f7 /plugins/zsh-navigation-tools/n-panelize
parentd54d896346db44d05c00d1f5b292ea4e59368672 (diff)
parent357d57c541970f59dd673df38ce166e9454c6da8 (diff)
downloadzsh-273063ad59a9ce125349100647204ef42ad83e1c.tar.gz
zsh-273063ad59a9ce125349100647204ef42ad83e1c.tar.bz2
zsh-273063ad59a9ce125349100647204ef42ad83e1c.zip
Merge pull request #4663 from psprint/master
znt: faster startup of tools using colorifying (e.g. n-history), optimized heap usage for older Zsh's
Diffstat (limited to 'plugins/zsh-navigation-tools/n-panelize')
-rw-r--r--plugins/zsh-navigation-tools/n-panelize11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/zsh-navigation-tools/n-panelize b/plugins/zsh-navigation-tools/n-panelize
index a70565c79..01d01cb9e 100644
--- a/plugins/zsh-navigation-tools/n-panelize
+++ b/plugins/zsh-navigation-tools/n-panelize
@@ -32,7 +32,11 @@ if [ -t 0 ]; then
return 1
fi
- list=( `"$@"` )
+ # This loop makes script faster on some Zsh's (e.g. 5.0.8)
+ repeat 1; do
+ list=( `"$@"` )
+ done
+
# TODO: $? doesn't reach user
[ "$?" -eq 127 ] && return $?
else
@@ -42,7 +46,10 @@ else
return 1
fi
- list=( "${(@f)"$(<&0)"}" )
+ # This loop makes script faster on some Zsh's (e.g. 5.0.8)
+ repeat 1; do
+ list=( "${(@f)"$(<&0)"}" )
+ done
if [[ ! -c /dev/tty ]]; then
exec <&2