Consider this code:
alias v1test {
if (1 != 2) {
echo -ag test1a: $v1 $v2
var %dummy = $customid
echo -ag test1b: $v1 $v2
}
}
alias customid {
if (3 != 4) {
echo -ag test2: $v1 $v2
}
return $true
}
/v1test results in:
test1a: 1 2
test2: 3 4
test1b: 3 4
I'd find it more useful if $v1 and $v2 behaved like local vars, ie their scope is limited to the alias or script they are executed in. In that case the example would result in:
test1a: 1 2
test2: 3 4
test1b: 1 2
That way the code for v1test is independent of whatever happens in customid.
Or does anyone use these identifiers to get info from other aliases? Maybe i'm just missing something...