magicant / yash-rs

Reimplementation of yash, an extended POSIX shell
64 stars 3 forks source link

Value of `$LINENO` within command substitution #404

Open magicant opened 3 weeks ago

magicant commented 3 weeks ago

Currently, the $LINENO that appears inside a command substitution expands to the line number in terms of the local script rather than the file containing the command substitution. Is this the expected behavior?


echo $LINENO # 1
echo $(echo $LINENO) # should be 1 or 2?