Skip to content

Commit 1d049aa

Browse files
committed
New startup option: early loading of juliarc.jl. (Closes #1364)
1 parent 2ed4840 commit 1d049aa

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

base/client.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ function process_options(args::Array{Any,1})
170170
# see repl-readline.c
171171
elseif args[i] == "-f" || args[i] == "--no-startup"
172172
startup = false
173+
elseif args[i] == "-F"
174+
# load juliarc now before processing any more options
175+
try include(strcat(ENV["HOME"],"/.juliarc.jl")) end
176+
startup = false
173177
elseif args[i][1]!='-'
174178
# program
175179
repl = false

ui/repl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ static const char *opts =
2727
" --machinefile file Run processes on hosts listed in file\n\n"
2828

2929
" --no-history Don't load or save history\n"
30-
" -f --no-startup Don't load ~/.juliarc.jl\n\n"
30+
" -f --no-startup Don't load ~/.juliarc.jl\n"
31+
" -F Load ~/.juliarc.jl, then handle remaining inputs\n\n"
3132

3233
" -h --help Print this message\n";
3334

0 commit comments

Comments
 (0)