Skip to content

Commit

Permalink
add -i option. fixes #6765
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed May 13, 2014
1 parent 3642d18 commit f4d1e94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ function process_options(args::Vector{UTF8String})
# load juliarc now before processing any more options
load_juliarc()
startup = false
elseif args[i] == "-i"
global is_interactive = true
elseif beginswith(args[i], "--color")
if args[i] == "--color"
color_set = true
Expand Down Expand Up @@ -354,7 +356,7 @@ function _start()
local term
if repl
if !isa(STDIN,TTY)
global is_interactive = !isa(STDIN,Union(File,IOStream))
global is_interactive |= !isa(STDIN,Union(File,IOStream))
color_set || (global have_color = false)
else
term = Terminals.TTYTerminal(get(ENV,"TERM",@windows? "" : "dumb"),STDIN,STDOUT,STDERR)
Expand Down
1 change: 1 addition & 0 deletions ui/repl.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ static const char *opts =
" -p n Run n local processes\n"
" --machinefile file Run processes on hosts listed in file\n\n"

" -i Force isinteractive() to be true\n"
" --no-history-file Don't load or save history\n"
" -f --no-startup Don't load ~/.juliarc.jl\n"
" -F Load ~/.juliarc.jl, then handle remaining inputs\n"
Expand Down

0 comments on commit f4d1e94

Please sign in to comment.