-
Notifications
You must be signed in to change notification settings - Fork 430
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
Make rtop behavior match common consoles. #92
Comments
Another feature that seemed missing: I think most people would appreciate if hitting tab would cycle through the available/currently-refined completion items. |
Do you think these are changes that can be made inside the reason project or will they need to go upstream to utop? |
I think these changes can even be made apart from utop. If they are helpful, and people like them, we can upstream them |
Hi @jordwalke! Do you think double c-c is right for an exit? When a user have some ping (think about ssh session), he can press keys twice. |
Doesn't Thanks for the interest. |
Hi @jordwalke, thank you for response
REPL is an interactive shell and better when it behaves the same way as other shells do:
But for me, the main reason to use I'd like to work on this issue, but triple |
I would like to do what most people prefer. Node does not destroy the session on control-d whether or not there are characters "ahead". I can see why that makes sense. Imagine you are deleting many characters ahead and you accidentally delete one too many. That would destroy the session. Whereas with c-c, you either press it zero or one times. Never repeatedly unless you want to end the session. I will run a poll though and see what people would like. Making sure that other people have a good experience is more important to me than what I would like. I'll report the findings. |
I'm not sure nodejs is a good example. People don't spend much time in node repl.
When you use
When working over ssh with large ping it can be an issue. |
I would rather have two |
@jordwalke looks like same problem with accidenal hitting key more time. About prompt. It can be good way to add some debounce:
Anyway, I need time to dive into code (I'm newbie in ocaml). Maybe I find better way in other REPLs. |
So, the difference between c-c and c-d, is that I would hold down c-d to delete many characters. Most people would never hold down c-c for a long time. That means c-d is more proned to accidental quitting of the REPL. Still, people have said that they wouldn't mind c-d to quit the REPL so .. I guess either way would be okay if you're willing to take a shot at implementing. |
@jordwalke BTW it already works in utop and rtop. |
Perhaps we just need to document it then! |
The
<CR>
behavior should match that of the Chrome console.cr
, it should submit whatever you have (even if it's invalid syntax), whileshift+cr
should insert a newline (it's not clear this is possible, but it would be awesome). This would match the Chrome REPL and also Slack/Messenger!rtop
(at least with iTerm).c-c
would cancel whatever command you're in the middle of editing, but it would also tell you "hit c-c again to exit". Right now, you have to typeexit 0;
which is kind of annoying.BetterErrors
.<CR>
. That's bad if your cursor is in in the middle of a currently valid parse, but you want to insert a newline anyways (to add a new field etc). For example, your cursor is afterx
, and you want to hit enter to insert a newline.shift+cr
fromcr
in the terminal. However, the main important feature is that there's a way to distinguish between "submit what I have entered" vs. "I want to force a newline in the input".cr
to submit, andshift+cr
to force a newline would be ideal, but it may not be possible in the terminal. Instead, perhaps we usecr
andctrl+cr
instead?In general, more people know how to use the Chrome REPL (of Slack for that matter) than any other REPL, so let's just match that (or are there any other popular REPLs that you know of that do a really great job?)
The text was updated successfully, but these errors were encountered: