You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Julia's REPL has a really nice feature: when you press the <down> key and you just picked and executed command #N in the history, then the REPL will select command #N+1 in the history (assuming you haven't pressed <up> yet).
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 typing <up><up><up>
4
julia> 3+3 #<-- this command was selected simply by typing <down> (instead of <up><up><up>)
6
julia> 4+4 #<-- this command was also selected simply by typing <down> (instead of <up><up><up>)
8
Rationale: it's very common 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 of them. Thanks to this "next command" feature, you only need to go back up for the command #N, then for every subsequent command, you just press once (or several times if you want to skip some commands).
It's probably not very hard to implement, and it's a real pleasure to use (git it a try!). Plus it won't break any user's expectations since this scenario currently does nothing at all.
The text was updated successfully, but these errors were encountered:
If we keep this history_index state, we must ensure that it is invalidated if History is cleared / reloaded / ...
check other similar libraries (I almost sure that linenoise behaves like rustyline because rustyline was based on linenoise but readline behaves like you describe)
check if this behaviour makes sense when history entries are immutable
Julia's REPL has a really nice feature: when you press the <down> key and you just picked and executed command #N in the history, then the REPL will select command #N+1 in the history (assuming you haven't pressed <up> yet).
For example:
Rationale: it's very common 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 of them. Thanks to this "next command" feature, you only need to go back up for the command #N, then for every subsequent command, you just press once (or several times if you want to skip some commands).
It's probably not very hard to implement, and it's a real pleasure to use (git it a try!). Plus it won't break any user's expectations since this scenario currently does nothing at all.
The text was updated successfully, but these errors were encountered: