lua-users home
lua-l archive

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


On Monday, March 09, 2015 09:08:54 PM Jan Behrens wrote:
> I think something else is meant: If you type an expression, press
> enter, view the result, and then press the <UP> key to browse through
> the history (using readline), the statement will show up with a
> preceeding "return ".

Pouar said he didn't want to see the return value so I thought he meant 
ignoring the results of statements.

    > os.execute "echo foo"
    foo
    true   exit    0

So you don't see the second line. Even with my patch return values are 
printed. It only changes what is saved in history.

Of course I agree the 'return' keyword appearing in history is a wart. Which 
is why I made the patch.

Another accidental hack to stop Lua 5.3 from adding the 'return' is to split 
the statement into two lines.

    > os.execute(
    >> "echo foo")
    foo

But that's just silly.

-- 
tom <telliamed@whoopdedo.org>