Looks like in contrast to what the dash.1 manual page says, expansion of PS{1,2,4} does work. Here is a little patch to set LINENO. The ways in that it is less than ideal mirror the ways that the line number error reporting is also less than ideal. For example if you run this: ( x=$((1/0)) # Just to add another line # And another ) # error reports this line The error reported will be the closing parenthesis even though I think most people would prefer the error to be the one where x was set. On 6/23/08, Rocky Bernstein <rocky.bernstein@xxxxxxxxx> wrote: > I have been looking at dash recently and notice in the manual page: > > BUGS: PS1, PS2, and PS4 should be subject to parameter expansion > before being displayed. > > Also I notice that there isn't a builtin LINENO which POSIX suggests > (e.g. http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html) > > I've been considering rectifying this. What's the protocol for > submitting a patch, and/or the likelihood this would get into a > release assuming the patch is reasonable. > > Is there currently a schedule for the next release? > > Thanks. >
Attachment:
lineno.diff
Description: Binary data