bash
bash copied to clipboard
Make all positional parameters available as special vars
We add a new constructor DollarNat to the SpecialVar data type to make positional parameters beyond 9 available as special variables. They are rendered with curly braces around the index if it has more than one digit.
This does lead to some duplication, as Dollar<i> has the same semantics as DollarNat <i> for 0 ≤ i ≤ 9.
Note
There is of yet no handling of the ${<i>} case in the specialVar parser function.