diff options
author | Soumith Chintala <soumith@gmail.com> | 2015-03-16 23:28:20 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2015-03-16 23:28:20 +0300 |
commit | 61a01e18e67533157a79d5e4d7c7543e4cfd3a22 (patch) | |
tree | 35b80c4c65abdf43e4f7cfaa72bb5ea57c1d9d72 | |
parent | 34f9adcdd3d405cf76d5e0db9ae73409570f9b97 (diff) | |
parent | 9e1bcff0dfbf1bf259397da76271242c7daf0efc (diff) |
Merge pull request #18 from torch/better-help
adding back selfhelp
-rw-r--r-- | init.lua | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -573,7 +573,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') |