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:
authorSoumith Chintala <soumith@fb.com>2015-03-16 23:26:32 +0300
committerSoumith Chintala <soumith@fb.com>2015-03-16 23:26:32 +0300
commit9e1bcff0dfbf1bf259397da76271242c7daf0efc (patch)
tree0fb29bd189b928208ee03def68cadb11f155e096 /init.lua
parent6eb66884bdb5416cf6ae3675a1c4a3ebac2f8758 (diff)
adding back selfhelp
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 9310918..bfbeb39 100644
--- a/init.lua
+++ b/init.lua
@@ -552,7 +552,10 @@ function repl()
-- Shortcut to get help:
if line and line:find('^%s-?') then
- if dok_loaded_ok then
+ if line:gsub('^%s-?','') == '' then
+ print(selfhelp)
+ line = nil
+ elseif dok_loaded_ok then
line = 'help(' .. line:gsub('^%s-?','') .. ')'
else
print('error: could not load help backend')