Mercurial Hosting > luan
diff core/src/luan/cmd_line.luan @ 313:1f6d828986b9
replace Http.request.servlet_path with Http.request.path;
rename Http.request.current_url to Http.request.url;
Web_server now loads welcome_file in init() for initialization;
fix cmd_line -e;
fix install for luan args;
git-svn-id: https://luan-java.googlecode.com/svn/trunk@314 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Thu, 25 Dec 2014 06:14:59 +0000 |
parents | 9fb523472035 |
children | fed1893821bf |
line wrap: on
line diff
--- a/core/src/luan/cmd_line.luan Wed Dec 24 11:15:27 2014 +0000 +++ b/core/src/luan/cmd_line.luan Thu Dec 25 06:14:59 2014 +0000 @@ -5,7 +5,7 @@ local standalone_usage = [=[ -usage: java luan.CmdLine [options] [script [args]] +usage: java luan.Luan [options] [script [args]] Available options are: -e stat execute string 'stat' -i enter interactive mode after executing 'script' @@ -38,12 +38,12 @@ showVersion = true elseif arg == "-e" then i = i + 1 - if i == #args then + if i > #args then standalone_error "'-e' needs argument" return end local cmd = args[i] - local stat = load(cmd,"(command line)",true,true) + local stat = load(cmd,"(command line)",{},true) local result = Table.pack( stat() ) if result.n > 0 then print( Table.unpack(result,1,result.n) )