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

Can't initialize for REPL mode only #183

Closed
dpo opened this issue Aug 26, 2019 · 2 comments · Fixed by #186
Closed

Can't initialize for REPL mode only #183

dpo opened this issue Aug 26, 2019 · 2 comments · Fixed by #186

Comments

@dpo
Copy link

dpo commented Aug 26, 2019

With Julia 1.2.0, if I put

atreplinit() do repl
  try
    using OhMyREPL
  catch e
    @warn "error while importing OhMyREPL" e
  end
end

in my ~/.julia/config/startup.jl, I get ERROR: LoadError: syntax: "using" expression not at top level.

If I use instead

atreplinit() do repl
  try
    @eval using OhMyREPL
  catch e
    @warn "error while importing OhMyREPL" e
  end
end

I get

┌ Warning: error while importing OhMyREPL
│   e =
│    InitError: UndefRefError: access to undefined reference
│    during initialization of module OhMyREPL
└ @ Main ~/.julia/config/startup.jl:14

So what is the syntax to only use OhMyREPL in REPL mode?!

@dpo
Copy link
Author

dpo commented Oct 16, 2019

Any ideas?

@KristofferC
Copy link
Owner

Yeah: #186

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants