|
On 13.03.2012 22:40, Axel Kittenberger wrote:
You can use Luaposix to do the same Posix commands bash would do in your script to achieve the same thing. Or you wrap a "bash -c" around the call again, to use bash functionality just like you used to. I just wonder what you expect to get as answer of the whole call, if B writes \033[2J -- clear screen \033[0#;0H --- goto 0/0 FOOBAR \033[0#;0H --- goto 0/0 MUH ? do you expect to get all the terminal codes? Or do you want to get "MUHBAR" what then will be seen on the terminal screen?
Neither. I didn't tell what I'm driving at because I didn't want to be laughed at by the whole list... But anyway, here is the story:
Some months ago I started learning Lua, just to keep my old brain working, and because I had fallen in love with the language. Since then I have been looking for a really simple and flexible UI which doesn't require the user to learn about 512 functions in order to create a simple "Save? yes/no/cancel" dialog. Some day, when I remembered that xterm is capable to report mouse events, the idea hit my mind that it should be possible to write a semi-graphical UI based on nothing but xterm and Lua. It sounds crazy, but I simply *had* to try it out. And it turned out to be in fact possible: I can now create buttons, dialogs, text inputs etc. using an xterm as canvas. As a side effect, I learned a lot about Lua (and also about xterm). When the thing is presentable, I could post a link here, in case anybody is interested.
Greetings, Bernd -- Bernd Eggink http://sudrala.de