Re: [Haserl-users] haserl / lua eats my newline?
Brought to you by:
nangel
|
From: Ralph S. <ra...@ne...> - 2022-01-26 21:08:51
|
Hi Nico, On Wed, Jan 26, 2022 at 04:40:33PM +0100, Nico de Haer wrote: > >I expected to get three lines of output but I got two. Is this >expected behavior? I'm not the maintainer, just a user - but to me this is correct and therefore expected behaviour. The man page indicates that the EVAL construct <%= expr %> is shorthand for "echo expr", but it actually expands to "echo -n expr". You can see this by adding --debug flag when calling haserl. This will cause it to output all the shell statements, rather than executing them. I find this quite helpful when trying to figure out what it is doing. In the case of using shell=lua, it looks like it expands to: io.write(tostring( foo )) without adding any newline, just like "echo -n". So it seems consistent at least. Best regards, -Ralph |