znt: optimize heap usage for older Zsh's (e.g. 5.0.8)
This commit is contained in:
parent
89205f90e5
commit
c793baeadd
@ -224,7 +224,11 @@ zcurses timeout main -1
|
|||||||
key=""
|
key=""
|
||||||
keypad=""
|
keypad=""
|
||||||
|
|
||||||
|
# This loop makes script faster on some Zsh's (e.g. 5.0.8)
|
||||||
|
repeat 1; do
|
||||||
list=( "$@" )
|
list=( "$@" )
|
||||||
|
done
|
||||||
|
|
||||||
last_element="$#list"
|
last_element="$#list"
|
||||||
|
|
||||||
while (( 1 )); do
|
while (( 1 )); do
|
||||||
|
@ -32,7 +32,11 @@ if [ -t 0 ]; then
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# This loop makes script faster on some Zsh's (e.g. 5.0.8)
|
||||||
|
repeat 1; do
|
||||||
list=( `"$@"` )
|
list=( `"$@"` )
|
||||||
|
done
|
||||||
|
|
||||||
# TODO: $? doesn't reach user
|
# TODO: $? doesn't reach user
|
||||||
[ "$?" -eq 127 ] && return $?
|
[ "$?" -eq 127 ] && return $?
|
||||||
else
|
else
|
||||||
@ -42,7 +46,10 @@ else
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# This loop makes script faster on some Zsh's (e.g. 5.0.8)
|
||||||
|
repeat 1; do
|
||||||
list=( "${(@f)"$(<&0)"}" )
|
list=( "${(@f)"$(<&0)"}" )
|
||||||
|
done
|
||||||
|
|
||||||
if [[ ! -c /dev/tty ]]; then
|
if [[ ! -c /dev/tty ]]; then
|
||||||
exec <&2
|
exec <&2
|
||||||
|
Loading…
Reference in New Issue
Block a user