-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Supporting multiple REPL modes and a switcher #14081
Comments
To allow a rampant increase in the number of REPL modes (I made a list one day with Jeff and came up with at least a dozen plausible modes), would people be supportive of the following idea: Replace the
[ and of course |
I like the sound of that. Assuming the API's for creating and registering new modes get documented a little more thoroughly than what we have now... And multiple packages trying to register the same key for different modes should be an obvious error. |
I do think we should have REPL-mode selection mode, but I also think help mode should continue to be entered with the |
@StefanKarpinski yes, i meant only that |
Ah, got it. Then yes, this seems like what we should do. |
Unfortunately, changing ; in that way would probably annoy lots of users. The idea is a good one though, could another character be used to intro the REPL menu, and leave Maybe one of Also, maybe + for C++, and c for C (Keno told me at JuliaCon that it would be trivial for him to add a C mode REPL)
Finally, I think that any mode gotten into by this menu should be sticky, even the ? and ; modes. |
I think a closing delimiter, Another option would be to require Overall +1 for this idea. I also think I like Scott's suggestion that shell- and other modes should be sticky. Not sure how I feel about help, though. |
I like I agree about wanting to retain |
That's what I meant, |
Cool – that seems like a pretty good general arrangement. |
I'm sure Gerry Sussman would love the super secret |
as i said, there are well over a dozen possible modes (actually closer to two dozen). i listed the 6 most common for an example.
the parsing of shell-meta characters (like quotes and variables) is very buggy right now (#10120), so i would probably use this change as an opportunity to modify it's behavior to be less unpredictable
the risk with this characters is that a mistake in typing an array literal (or pasting it in on a terminal that doesn't have copy/paste delimiters) could send you off into a new mode (since it's not uncommon to put a newline before the closing bracket) -- i think that is an acceptable risk, however. |
Is there an issue which lists all of the potentially useful REPL modes? Sounds interesting.
That would be good - for our limited use (mostly checking things quickly with ls/more/grep/man)
I don't think the paste code would hit this - but that can be checked for, to not treat ] in copy/paste as this menu starter. I also think that when you are entering an expression, it wouldn't hit the check for ] as the first character either. If you try it at the REPL now, |
@ScottPJones "Unfortunately, changing ; in that way would probably annoy lots of users." While ; is legal in the shell, it's not helpful to start with, right? Maybe one ; could get the shell, but only if another ; is not entered? If another ; then that would trigger a prompt. [Are there some other chars that are never useful, as first char, in the shell (and across shells, I'm not sure if same would apply to e.g. PowerShell) that could trigger something?] |
Considering this accepted with |
We need to rethink the |
I often find myself using
@everywhere ...
and keep thinking that it would be great to have a parallel repl that automatically runs everything on every node.Since the discussion that follows is about multiple repl modes, I will open a separate issue for the original parallel repl. -- VBS
The text was updated successfully, but these errors were encountered: