repl history/editing
See original GitHub issueSince we won’t likely to have a fully functioning VIM mode in the new rusty repl, I propose to add the following repl commands to mitigate that:
\e [N]
or \edit [N]
to open the system $EDITOR
for the last (if N
isn’t provided), or the last N-th (if N
is negative), or the N-th (if N
is positive) command.
\s
or \history
to open a pager with the history of executed commands (latest to oldest), e.g.
[43]
SELECT User {
name
};
[42]
SELECT 1 / 0;
The user then can press [ESC]
, enter \e 42
and edit the SELECT 1 / 0
query.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top Results From Across the Web
File History | Replit Docs
File History. To make sure you never lose any of your work, Replit auto-saves your code as you write. If you ever lose...
Read more >REPL history browser :: CIDER Docs
You can browse your REPL input history with the command M-x cider-repl-history ... CIDER inserts the text without a final newline, allowing you...
Read more >Start repl with history and line-edit capabilities from -main
Hi… just a quick question. I would like to start a repl from -main in an uberjar that has line editor and persistent...
Read more >MIT Scheme REPL history - Stack Overflow
The program rlwrap adds command history and covenient editing to almost all command line tools. http://utopia.knoware.nl/~hlub/uck/rlwrap/.
Read more >REPL History · Clojure development with Spacemacs & Cider
You can view the history of expressions in a separate buffer via the REPL Command menu, available when the REPL buffer is active....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
psql uses
\s
for history shortcutFirst version of the commands is implemented. They currently only support negative numbers, because that allows seamless integration with history. (I.e. with positive numbers it’s unclear whether
1
is a first item in current session or the first history entry, both options have their downsides).Let me know if that doesn’t work for you.