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@gmail.com>2015-09-25 19:01:41 +0300
committerSoumith Chintala <soumith@gmail.com>2015-09-25 19:01:41 +0300
commitf7960316998f24bd62aa2d1461a06f07e0196c55 (patch)
tree173130aebd2becd7fbaa70391ed21b5387d360e9
parent9eb1b97f0304a0b2ed28ef81c0870a9baa8f9c70 (diff)
parent2e0206a5ab601ed4e684c99b7038b8e725df31da (diff)
Merge pull request #31 from zhengwy888/master
skip readline when HOME is not present in environment
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index d5d1f12..c117c57 100644
--- a/init.lua
+++ b/init.lua
@@ -514,7 +514,7 @@ _LAST = ''
-- Readline:
local readline_ok,readline = pcall(require,'readline')
local nextline,saveline
-if readline_ok then
+if readline_ok and (os.getenv('HOME') or os.getenv('USERPROFILE')) ~= nil then
-- Readline found:
local history = (os.getenv('HOME') or os.getenv('USERPROFILE')) .. '/.luahistory'
readline.setup()