Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/trepl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClement Farabet <clement.farabet@gmail.com>2013-02-24 05:13:30 +0400
committerClement Farabet <clement.farabet@gmail.com>2013-02-24 05:13:30 +0400
commit09c4ac51b448bf0d0745203b3968bd612c5ef202 (patch)
treed6daf255977b69f2abc4743424069259e826a04d /README.md
parent5a49c9d39a18c4e1b7304ac0687692bcdaa4d303 (diff)
README.
Diffstat (limited to 'README.md')
-rw-r--r--README.md63
1 files changed, 61 insertions, 2 deletions
diff --git a/README.md b/README.md
index 69d0b20..f9f028f 100644
--- a/README.md
+++ b/README.md
@@ -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
+```
+