Script parsing bug? - 04/06/07 05:04 PM
Code:
alias bug while $for(4) if (%for == 3) $forreturn(%for) alias nobug while $for(4) { if (%for == 3) $forreturn(%for) } alias nobug2 while ($for(4)) if (%for == 3) $forreturn(%for) alias -l for { if (%for < $1) || (%for == $null) { inc %for | return $true } set %for 0 | return $false } alias -l forreturn { set %for 0 | return return $1 }
Should this be a bug? Why are the curly brackets or parentheses needed for the while loop?
if has a single command of $forreturn and while has the the single command of if
Edit: /bug error message
* /while: 'if' unknown operator
Thus, it's the begining of the command, not an error...