alias hello {
for (%x = 0;%x <= 5;+) $scriptline {
echo -a yay
echo -a MultiLine! :D
}
echo -a Such a crappy for loop implementation :P
}
alias tok return $gettok($1,$2,32)
alias for {
!noop $regex($1-,/\((.+?);(.+?);(.+)\)\s(\d+)/)
set -l $tok($regml(1),1) $tok($regml(1),3)
var %s = $regml(4) + 1 , %crement = $replace($regml(3),+,inc,-,dec) $tok($regml(1),1) , %condition = $regsubex($regml(2),/(\w+)$/,$calc($(\1,2) -2)))
window -h @cool
filter -fwgnr $+(%s,-999999) $qt($script) @cool /^\s*?}\s*?$/
var %e = $tok($line(@cool,1),1) - 1
window -c @cool
tokenize 32 %condition
while ($($1,2) $2 $($3,2)) {
filter -fkgr $+(%s,-,%e) $qt($script) forcommands
%crement
}
}
alias forcommands $1-