1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-01-19 11:31:26 +01:00

37804 (plus 37816): first word following "repeat" should be evaluated as math

This commit is contained in:
Barton E. Schaefer 2016-01-27 22:10:03 -08:00
parent d18476ce5c
commit 0b37b5149d
2 changed files with 6 additions and 1 deletions

View file

@ -1,5 +1,8 @@
2016-01-27 Barton E. Schaefer <schaefer@zsh.org>
* 37804 (plus error return per 37816): Src/loop.c: first word
following "repeat" should be evaluated as math, to match docs
* 37819: Src/hist.c: zshaddhistory hook is intended to work for
any history file write, even upon keyboard interrupt

View file

@ -493,7 +493,9 @@ execrepeat(Estate state, UNUSED(int do_exec))
tmp = ecgetstr(state, EC_DUPTOK, &htok);
if (htok)
singsub(&tmp);
count = atoi(tmp);
count = mathevali(tmp);
if (errflag)
return 1;
pushheap();
cmdpush(CS_REPEAT);
loops++;