Description
It seems that the nushell shell is incompatible with the Julia REPL at the moment. When I hit ;
in the Julia REPL to open the shell, and write any command, I get this:
julia> ;
shell> echo "Hello World"
Error: nu::parser::shell_andand
× The '&&' operator is not supported in Nushell
╭─[source:1:22]
1 │ (echo 'Hello World') && true
· ─┬
· ╰── instead of '&&', use ';' or 'and'
╰────
help: use ';' instead of the shell '&&', or 'and' instead of the boolean '&&'
I think the Julia REPL should either be made compatible with nushell, or it should run commands in a compatible shell like bash. Right now I can't seem to do anything in the shell mode because my default shell is nushell.
Context: Nushell is a new type of cross-platform shell written in pure rust: https://github.com/nushell/nushell/. Instead of "&&" they use "and" (among several other differences).
Metadata
Metadata
Assignees
Labels
No labels
Activity
jakobjpeters commentedon Apr 29, 2024
I also would like to use nushell. This Discourse post says that shell mode only supports POSIX shells and that one can set the JULIA_SHELL environment variable as a workaround.
Seelengrab commentedon Apr 29, 2024
The
shell>
mode in the REPL doesn't actually spawn a shell, and instead evokes programs directly IIRC. How does this end up calling into nushell in the first place?MilesCranmer commentedon Apr 29, 2024
I’m not sure how it gets called. Maybe if JULIA_SHELL is unset it simply takes SHELL?
But where does the
&&
come from? All that needs to be changed is that. Is that fromrun
?At the bottom of #23597 @xgdgsc and @stevengj were also discussing Nushell as a potential solution to having a shell mode on windows.
KristofferC commentedon Apr 29, 2024
I think the shell mode does spawn a shell. Perhaps you are thinking about
run
?Anyway, a small tweak to
julia/base/client.jl
Lines 63 to 68 in 6023ad6
could probably fix this.