Skip to content

Commit

Permalink
provide isinteractive(). closes #572
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed May 26, 2012
1 parent a2249bb commit a8ef489
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 4 additions & 0 deletions base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ end
const _jl_roottask = current_task()
const _jl_roottask_wi = WorkItem(_jl_roottask)

_jl_is_interactive = false
isinteractive() = (_jl_is_interactive::Bool)

function _start()
try
ccall(:jl_register_toplevel_eh, Void, ())
Expand Down Expand Up @@ -214,6 +217,7 @@ function _start()
(quiet,repl) = process_options(ARGS)
if repl
global _jl_have_color = success(`tput setaf 0`) || has(ENV, "TERM") && matches(r"^xterm", ENV["TERM"])
global _jl_is_interactive = true
if !quiet
_jl_banner()
end
Expand Down
1 change: 0 additions & 1 deletion src/julia.expmap
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
memhash_seed;
memhash32;
memhash32_seed;
jl_hash_symbol;
jl_symbol_name;
jl_uid;
jl_strtod;
Expand Down

0 comments on commit a8ef489

Please sign in to comment.