Posted 15 January 2013 - 04:35 PM
LUAU - Lua Upgraded, version 0.1 (initial release)
Luau is a replacement for the standard Lua shell on computers, advanced computers, or turtles.
Features:
Download: http://pastebin.com/US6uMnQC
Screenshots:
Luau running on a turtle:
[attachment=922:luau-turtle.png]
Running on an advanced computer:
[attachment=921:luau-computer.png]
Known issues / upcoming features:
Luau is a replacement for the standard Lua shell on computers, advanced computers, or turtles.
Features:
- Color support: It looks nice on advanced computers.
- Online help. The "/help" and "/commands" …erm…commands give descriptions of all the features.
- Enhanced command history: You can access the n-th line you typed as in_[n], and if it had an output, you can get it by out_[n]. You can repeat the (say) 23rd command by typing "!23". There's also a command to search the command history for a particular string or pattern.
- Substitution operator: If you mess up and type os.loadApi('my_api'), just type "s/Api/API/" on the next line and it'll make the substitution ("API" for "Api") and re-run the fixed command for you. Can be way faster than manual editing, and you can use all of Lua's pattern-matching features.
- "?foo" is short for "print(foo)", with the added benefit that if foo is a table, you'll see its key/value pairs instead of something like "table: 10cc67a".
- That annoying "1" that shows up when you print anything has been suppressed.
- Macros: You can define macros that will be expanded automatically. For instance, if you get tired of typing "os.loadAPI('my_api')", you could type "/macro %la=os.loadAPI('%1')", and after that you can just type "%la[my-api]". Macros can have any number of parameters, or none (simple text expansions).
- (Somewhat) configurable. Right now the only options are whether to use color and how many blank lines to put between input/output pairs.
- Config options and macro definitions are saved across sessions.
Download: http://pastebin.com/US6uMnQC
Screenshots:
Luau running on a turtle:
[attachment=922:luau-turtle.png]
Running on an advanced computer:
[attachment=921:luau-computer.png]
Known issues / upcoming features:
- Interaction between substitution and macro expansion could be better, and will be.
- Enhance substitution so that s17/foo/bar/ reruns the 17th entry in the history with foo's changed to bar's.
- Option to load command history from prior sessions.
- Got a feature you'd like to see? Post it here!