-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Julia REPL should show environment name inline #54235
Labels
kind:feature
Indicates new feature / enhancement requests
stdlib:REPL
Julia's REPL (Read Eval Print Loop)
Comments
The current way to check the active project is to switch to the Pkg mode by pressing |
Ok, should we do that too then? Oh wait...? So maybe that isn't such a good idea, or? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
kind:feature
Indicates new feature / enhancement requests
stdlib:REPL
Julia's REPL (Read Eval Print Loop)
Currently, without any changes to
startup.jl
, runningjulia
from the command activates the root environment. I think this is a poor UX but it exists for safety reasons ( we don't want julia -e "using Foo" to load arbitrary malicious code ).In internal documentation, I've recommended using
julia --project=.
as the default way new users should start a REPL.But it can be easy to fat finger this and you can end up nesting levels a folder level. Here's an example I've seen people do accidentally:
Here's another screenshot I took of a colleague's computer from this morning, where they forgot to add a
.
in@.
:I think if the prompt has some indication of what the environment was, it would have been more clear to my colleague without me intervening. I've seen new users run into this issue enough times that I think it is worth making some UX change to the Julia REPL to improve the situation.
I particularly like how in conda, the environment is always listed as part of the shell:
We don't have to go that far as to make the shell aware of Julia but making a prompt inside the Julia REPL more user friendly would be an improvement imho.
If we wanted to preserve space, we can leave the display as is for shorter terminal widths but with wider terminals are available, we can print the environment name on the right hand side. e.g.:
The text was updated successfully, but these errors were encountered: