Skip to content
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

make -i option run REPL. fixes #11347 #11420

Merged
merged 2 commits into from
May 25, 2015
Merged
Show file tree
Hide file tree
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: 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