Skip to content
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

Feature request: Julia-style "next command" down key in the REPL #6877

Closed
ageron opened this issue Jul 6, 2024 · 3 comments
Closed

Feature request: Julia-style "next command" down key in the REPL #6877

ageron opened this issue Jul 6, 2024 · 3 comments

Comments

@ageron
Copy link
Contributor

ageron commented Jul 6, 2024

Julia's REPL has a really nice feature: when you press the down key, if you just picked and executed a command in the history, it will select the following command in the history.

For example:

julia> 1+1
2
julia> 2+2
4
julia> 3+3
6
julia> 4+4
8
julia> 2+2        #<-- this command was selected in the history by type <up><up><up>
4
julia> 3+3        #<-- this command was selected simply by typing <down>

Rationale: it's very common to want to execute several commands in a row from the history (perhaps skipping or editing a few of them). If these commands are far up in the history, then it's cumbersome to have to go back up for each one. Thanks to this "next command" feature, you only need to go back up once.

It's probably not very hard to implement, and it's a real pleasure to use. Why not in Roc's REPL?

@Anton-4
Copy link
Collaborator

Anton-4 commented Jul 6, 2024

I'd be fine with that addition, we rely on rustyline for these things. Would you be willing to add an issue to rustyline for this? That way all projects relying on rustyline will be able to use this feature :)

@ageron
Copy link
Contributor Author

ageron commented Jul 6, 2024

Yes, I started looking at that yesterday and I noticed that it's rustyline under the hood. I'll file an issue over there. 👍

@ageron ageron closed this as completed Jul 6, 2024
@ageron
Copy link
Contributor Author

ageron commented Jul 6, 2024

Here's the rustyline issue I just created: kkawakam/rustyline#781

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants