lua-users home
lua-l archive

Re: Should the interactive interpreter insert "return" in readline history?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Monday, March 09, 2015 01:47:24 PM Pouar wrote:
> Can you please include the option to disable printing the return value
> in interactive mode. It's annoying.
> 
> I'm not suggesting removing it altogether, just the option to disable it.
You're referring to the patch[1] I wrote a few months ago? That's only about 
adding the keyword 'return' to expressions typed in the prompt. Are you saying 
you want to not see the return value from expressions? I don't understand why 
you'd want that.
Not wanting the return from statements is understandable. But whether by 
accident or design you can already do it. Add two semicolons after the 
statement.
 > math.random()
 0.84018771676347
 > math.random();;
 >
It also works to type the semicolon before the statement. But neither of these 
will allow you to type an expression.
[1] http://lua-users.org/lists/lua-l/2014-12/msg00336.html
-- 
tom <telliamed@whoopdedo.org>

AltStyle によって変換されたページ (->オリジナル) /