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-07-24 10:09:56 +0300
committerSoumith Chintala <soumith@gmail.com>2015-07-24 10:09:56 +0300
commit015b0eb1e2275093f6413abe521892fcaeac605f (patch)
tree070db928238e389e7354244f0c3958554b5a420e
parentddbee8d51189e1b9d73235d8c7642905b84c621e (diff)
parent9106a1195fbf32ef2b2078b56c7769f84be5ba7f (diff)
Merge pull request #26 from samehkhamis/master
Making things work under windows
-rw-r--r--init.lua2
-rw-r--r--trepl-scm-1.rockspec14
2 files changed, 15 insertions, 1 deletions
diff --git a/init.lua b/init.lua
index 9bd9ca5..d5d1f12 100644
--- a/init.lua
+++ b/init.lua
@@ -516,7 +516,7 @@ local readline_ok,readline = pcall(require,'readline')
local nextline,saveline
if readline_ok then
-- Readline found:
- local history = os.getenv('HOME') .. '/.luahistory'
+ local history = (os.getenv('HOME') or os.getenv('USERPROFILE')) .. '/.luahistory'
readline.setup()
readline.read_history(history)
nextline = function(aux)
diff --git a/trepl-scm-1.rockspec b/trepl-scm-1.rockspec
index 49d29f8..81c85a6 100644
--- a/trepl-scm-1.rockspec
+++ b/trepl-scm-1.rockspec
@@ -31,6 +31,20 @@ build = {
libraries = {'readline'}
}
},
+ platforms = {
+ windows = {
+ modules = {
+ ['readline'] = {
+ sources = {'readline.c'},
+ libraries = {'readline'},
+ defines = {"USE_READLINE_STATIC"},
+ incdirs = {"windows"},
+ libdirs = {"windows"},
+ libraries = {'readline-win'}
+ }
+ }
+ }
+ },
install = {
bin = {
'th'