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>2016-12-30 21:42:22 +0300
committerGitHub <noreply@github.com>2016-12-30 21:42:22 +0300
commitf8831bee21a9d6a41e47ef8626a3bef9ca2d66e5 (patch)
treee573a466352cfb35f919b02e676250b2b73163d7
parentdd1f23870b85db6b9ae4afb5fcf4563c6add8ef1 (diff)
parent14e89d0590bff068113c92774b489219ee830815 (diff)
Merge pull request #61 from nhynes/treplstartup
Allow executing file before trepl starts
-rw-r--r--th5
1 files changed, 5 insertions, 0 deletions
diff --git a/th b/th
index dfd8d50..ba798c3 100644
--- a/th
+++ b/th
@@ -104,6 +104,11 @@ end
local repl = require 'trepl'
local col = require 'trepl.colorize'
+-- load startup file
+if os.getenv('TREPLSTARTUP') and not (interactive or statement) then
+ dofile(os.getenv('TREPLSTARTUP'))
+end
+
-- load gfx env?
if lgfx then
local ok = pcall(require, 'gfx.js')