|
|
|
@ -1,8 +1,8 @@ |
|
|
|
if Base.isinteractive() && |
|
|
|
if Base.isinteractive() && |
|
|
|
(REPL = get(Base.loaded_modules, Base.PkgId(Base.UUID("3fa0cd96-eef1-5676-8a61-b3b8758bbffb"), "REPL"), nothing); REPL !== nothing) |
|
|
|
(REPL = get(Base.loaded_modules, Base.PkgId(Base.UUID("3fa0cd96-eef1-5676-8a61-b3b8758bbffb"), "REPL"), nothing); REPL !== nothing) |
|
|
|
|
|
|
|
|
|
|
|
# Exit Julia with :q |
|
|
|
# Exit Julia with :q |
|
|
|
pushfirst!(REPL.repl_ast_transforms, function(ast::Expr) |
|
|
|
pushfirst!(REPL.repl_ast_transforms, function(ast::Union{Expr,Nothing}) |
|
|
|
if Meta.isexpr(ast, :toplevel, 2) && ast.args[2] === QuoteNode(:q) |
|
|
|
if Meta.isexpr(ast, :toplevel, 2) && ast.args[2] === QuoteNode(:q) |
|
|
|
exit() |
|
|
|
exit() |
|
|
|
end |
|
|
|
end |
|
|
|
@ -10,7 +10,7 @@ if Base.isinteractive() && |
|
|
|
end) |
|
|
|
end) |
|
|
|
|
|
|
|
|
|
|
|
# Automatically load Debugger.jl when encountering @enter |
|
|
|
# Automatically load Debugger.jl when encountering @enter |
|
|
|
pushfirst!(REPL.repl_ast_transforms, function(ast::Expr) |
|
|
|
pushfirst!(REPL.repl_ast_transforms, function(ast::Union{Expr,Nothing}) |
|
|
|
if Meta.isexpr(ast, :toplevel, 2) && Meta.isexpr(ast.args[2], :macrocall) && |
|
|
|
if Meta.isexpr(ast, :toplevel, 2) && Meta.isexpr(ast.args[2], :macrocall) && |
|
|
|
ast.args[2].args[1] === Symbol("@enter") && !isdefined(Main, Symbol("@enter")) |
|
|
|
ast.args[2].args[1] === Symbol("@enter") && !isdefined(Main, Symbol("@enter")) |
|
|
|
@info "Loading Debugger..." |
|
|
|
@info "Loading Debugger..." |
|
|
|
|