lua-users home
lua-l archive

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


On Wed, Apr 25, 2012 at 9:12 PM, Jay Carlson <nop@nop.com> wrote:
>mostly has the same result as C-e. Also, C-r is like the whole reason to have persistent history and it's still in the todo list.

Nah, I never use it, so I never miss it ;)   In any case, there are
Lua bindings to readline floating around.

Actually, a smart Lua REPL should warn about any lines beginning with
the token 'local'.

> If you wanted your own shell language, the restriction to top-level chunks means there is not a lexical capture problem; any variables referenced in a ".grep $pattern" line would have to come from _G anyway. One thing you could do is
>
>  DISPLAY=":1"
>  export"DISPLAY"

Modifying the environment is actually the current weakness, but
fixable with luaposix's setenv.

> p = require 'posix'
> p.setenv('FOO','bonzo dog')
>.echo $FOO
bonzo dog
>

I've thought about pre-expansion of Lua globals for the shell commands
too, but hadn't thought about the quoting issue. The expansion I am
implementing is to allow for this kind of thing (since it drives me
crazy to have to use a mouse for this)

> .locate - b luaish
1 /home/steve/luabuild/luaish
2 /home/steve/tests/luaish
3 /home/steve/tests/luaish.lua
> .cd $2

"As simple as possible, but no simpler"

steve d.