Skip to content

fix #472 (command line arguments are broken) #507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 3, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion j/client.j
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ function parse_input_line(s::String)
end

function process_options(args::Array{Any,1})
global ARGS
quiet = false
repl = true
if has(ENV, "JL_POST_BOOT")
Expand All @@ -128,12 +129,16 @@ function process_options(args::Array{Any,1})
# TODO: support long options
repl = false
i+=1
ARGS = args[i+1:end]
eval(parse_input_line(args[i]))
break
elseif args[i]=="-E"
repl = false
i+=1
ARGS = args[i+1:end]
show(eval(parse_input_line(args[i])))
println()
break
elseif args[i]=="-P"
i+=1
eval(parse_input_line(args[i]))
Expand All @@ -157,7 +162,6 @@ function process_options(args::Array{Any,1})
elseif args[i][1]!='-'
# program
repl = false
global ARGS
# remove julia's arguments
ARGS = ARGS[i:end]
include(args[i])
Expand Down