I think you just need to double check (or "quadruple"?) again to ensure what you gave us is in fact what you're testing.

For reference, we are testing:

Code:
//tokenize 32 This is a test, 123456789 | echo -a $textreturn($1-)


With your textreturn alias given below:

Code:
alias textreturn { var %x = $1- | return %x }


The result for me is "This is a test, 123456789"

Keep in mind that the above string should only fill $1 in the textreturn alias, since identifiers are tokenized by literal commas (NOT INCLUDING commas inside of variables or identifiers). Your alias should give the same result if you changed it to:

Code:
alias textreturn return $1


edit:

Note that it IS possible to return the result you reported, but it would require using [] brackets to re-order evaluation as such:

Code:
//tokenize 32 A, B | echo -a $textreturn( [ $1- ] )


The above will evaluate $1- before $textreturn(...), converting the single argument into two: "A, B" (equivalent to $textreturn(A, B)). Then, your identifier "textreturn" would be filled with $1 = A and $2 = B. In this case, using $1- will re-tokenize $1 and $2 by spaces, returning $1 [space] $2, or "A B".

Is this what you are doing?

Last edited by argv0; 08/02/11 11:42 PM.