Skip to content

Commit

Permalink
Merge pull request #11420 from JuliaLang/jb/interactiveoption
Browse files Browse the repository at this point in the history
make -i option run REPL. fixes #11347
  • Loading branch information
JeffBezanson committed May 25, 2015
2 parents 3bc6c75 + 5b9fd0b commit 96cc970
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@ Language changes
macro. Instead, the string is first unindented and then `x_str` is invoked,
as if the string had been single-quoted ([#10228]).

Command line option changes
---------------------------

* The `-i` option now forces the REPL to run after loading the specified script (if any) ([#11347]).

Compiler improvements
---------------------

Expand Down Expand Up @@ -1426,4 +1431,5 @@ Too numerous to mention.
[#11145]: https://github.com/JuliaLang/julia/issues/11145
[#11171]: https://github.com/JuliaLang/julia/issues/11171
[#11241]: https://github.com/JuliaLang/julia/issues/11241
[#11347]: https://github.com/JuliaLang/julia/issues/11347
[#11379]: https://github.com/JuliaLang/julia/issues/11379
5 changes: 4 additions & 1 deletion base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ let reqarg = Set(UTF8String["--home", "-H",
repl = false
# remove filename from ARGS
shift!(ARGS)
ccall(:jl_exit_on_sigint, Void, (Cint,), 1)
if !is_interactive
ccall(:jl_exit_on_sigint, Void, (Cint,), 1)
end
include(args[1])
else
println(STDERR, "julia: unknown option `$(args[1])`")
Expand All @@ -315,6 +317,7 @@ let reqarg = Set(UTF8String["--home", "-H",
end
break
end
repl |= is_interactive
return (quiet,repl,startup,color_set,history_file)
end
end
Expand Down
5 changes: 2 additions & 3 deletions ui/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static const char opts[] =
" 'auto' launches as many workers as the number of local cores\n"
" --machinefile <file> Run processes on hosts listed in <file>\n\n"

" -i Force isinteractive() to be true\n"
" -i Interactive mode; REPL runs and isinteractive() is true\n"
" --color={yes|no} Enable or disable color text\n\n"
" --history-file={yes|no} Load or save history\n"
" --no-history-file Don't load history file (deprecated, use --history-file=no)\n"
Expand All @@ -76,8 +76,7 @@ static const char opts[] =

" --track-allocation={none|user|all}, --track-allocation\n"
" Count bytes allocated by each source line\n\n"
" -O, --optimize\n"
" Run time-intensive code optimizations\n"
" -O, --optimize Run time-intensive code optimizations\n"
" --check-bounds={yes|no} Emit bounds checks always or never (ignoring declarations)\n"
" --dump-bitcode={yes|no} Dump bitcode for the system image (used with --build)\n"
" --depwarn={yes|no} Enable or disable syntax and method deprecation warnings\n"
Expand Down

0 comments on commit 96cc970

Please sign in to comment.