I wanted to start a discussion on some features that I think it would be nice to have in the Julia REPL by default, and some features that exist in ipython
already.
- Convey difference visually between input prompt, expression’s return value and stdout
For example, here is Julia’s REPL when you run 1 + 1
and println(1 + 1)
.
Here’s the same thing with ipython
.
With ipython
, there’s a difference between what is stdout and what is the returned value of the expression evaluated. I’ve found when teaching beginners how to code, this can a big source of frustration or confusion.
- Having
zsh
orfish
shell like completions.
You’ll notice in the screenshot above, when I type p
in the ipython
REPL the REPL hints that the history contains a expression that begins with the same character. In zsh
or fish
or ipython
, I can hit the Right arrow key and this populates the prompt with that expression.
- TAB and S-TAB for autocompletion cycling
In the default Julia REPL, hitting TAB first completes to the longest common completion, and then further presses only prints the same completions over and over again. When there are a large number of completions, this results in the terminal history being polluted. It would be nice to cycle through options the way ipython
does.
- Syntax highlighting
This can be achieved using OhMyREPL but it would be nice to get this by default.
I personally would like to see a better REPL out of the box, or at least an alternative REPL that one could alias to.
Are there other features one would like to see in a Julia REPL? I wanted to start a discussion to brainstorm some ideas here. I’m interested in making this happen and would be willing to work on it too.
For example, one feature that I’d like is if I ever run julia
in a folder where there’s a Project.toml
file, I’d like the julia>
prompt to change to julia * >
or something like that. In almost all instances, if I’m running julia
in a folder where there’s a Project.toml
, I’d imagine the user would want the environment activated by default or at least warn that there is an environment to be activated in that folder.