diff options
author | Clement Farabet <clement.farabet@gmail.com> | 2013-02-24 05:13:30 +0400 |
---|---|---|
committer | Clement Farabet <clement.farabet@gmail.com> | 2013-02-24 05:13:30 +0400 |
commit | 09c4ac51b448bf0d0745203b3968bd612c5ef202 (patch) | |
tree | d6daf255977b69f2abc4743424069259e826a04d /README.md | |
parent | 5a49c9d39a18c4e1b7304ac0687692bcdaa4d303 (diff) |
README.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 63 |
1 files changed, 61 insertions, 2 deletions
@@ -4,6 +4,13 @@ TREPL: A REPL for Torch A pure Lua REPL for Torch. Uses [Linenoise](https://github.com/hoelzro/lua-linenoise) for completion/history. +Features: + +* Tab-completion +* History +* Pretty print (table introspection and coloring) +* No need for '=' to print + Install ------- @@ -13,8 +20,8 @@ Via Luarocks: luarocks install trepl ``` -Use ---- +Launch +------ With pure Lua: @@ -35,3 +42,55 @@ With Torch9 (coming soon): luajit -ltrepl -ltorch ``` +Use +--- + +Completion: + +```lua +[Lua # 1] > cor+TAB ... completes to: coroutine +``` + +History: + +```lua +[Lua # 1] > ARROW_UP | ARROW_DOWN +``` + +Shell commands: + +```lua +[Lua # 1] > $ ls +README.md +init.lua +trepl-scm-1.rockspec + +[Lua # 2] > $ ll +... + +[Lua # 3] > $ ls +... +``` + +History / last results. Two variables are used: + +``` +_RESULTS: contains the history of results: + +[Lua # 1] > a = 1 +[Lua # 2] > a +1 +[Lua # 3] > 'test' +test +[Lua # 4] > _RESULTS +{ + 1 : 1 + 2 : test +} + +_LAST: contains the last result, _ is a shortcut, +that's only used if not already defined: +[Lua # 5] > _ +test +``` + |