question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

repl history/editing

See original GitHub issue

Since 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
elpranscommented, Feb 20, 2020

psql uses \s for history shortcut

0reactions
tailhookcommented, Feb 28, 2020

First 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found