Martijn Dekker dixit:

>OK, it turns out that LINENO==0 within alias expansion and LINENO==0
>within 'eval' execution are actually two separate problems requiring
>separate fixes.

Indeed, I see.

>The simple patch attached
>- preserves LINENO for alias expansion, and
>- makes LINENO within 'eval' act like ksh88, which is good enough for
>me. I guess I'd prefer it to act like ksh93, *ash, yash and native zsh,
>but I can't figure out how to make that happen.

Yeah, I see why that’d be difficult; s->line is not increased by
checking for newlines but from the line reader in where the shell
gets interactive or script input lines.

This one actually makes more sense to me (though 1 2 3 4 5 6 also would)
than ksh93’s though… on that note, for error reporting, I have on my
long-term TODO proper backtrace-ish FUNCNAME/BASH_LINENO/BASH_SOURCE
arrays (although I believe bash’s implementation (at the time I first
saw this) to not correspond to its documentation).

>>>weird, and zsh-workers that zsh's sh mode is not emulating any current sh).

Well, now it does (again) ☺

Thanks anyway, patch applied.

bye,
//mirabilos
-- 
21:12⎜<Vutral> sogar bei opensolaris haben die von der community so
ziemlich jeden mist eingebaut │ man sollte unices nich so machen das
desktopuser zuviel intresse kriegen │ das macht die code base kaputt
21:13⎜<Vutral:#MirBSD> linux war früher auch mal besser :D

Reply via email to