Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What program can help a REPL shell remember and search history?

I'm playing with Paul Graham's arc, and it's getting really annoying that the up arrow inserts ^[[A instead of the previous command, and ^R doesn't work as in shell. I vaguely remember there being a simple way to run Arc's REPL in a program which will remember the input history - does anyone know what it is?

like image 907
Andrey Fedorov Avatar asked May 28 '09 08:05

Andrey Fedorov


People also ask

How do I check my REPL history?

How to Access History​ A repl's history is located at https://replit.com/@username/repltitle/history , but you can reach the same page by: Choosing "History" from the three-dot menu for that specific repl (from the My Repls page) or. Clicking on the rewind button located in the top navigation bar inside the repl.

How do people remember all the Linux commands?

The first thing you can use to remember commands that you've already used is your own command line history. Most Linux shells, including the most common default, Bash, create a history file that lists your past commands. For Bash, you can find it at “/home/<username>/. bash_history.”


2 Answers

Perhaps you're thinking of rlwrap?

like image 82
Nicholas Riley Avatar answered Nov 15 '22 08:11

Nicholas Riley


I like rlwrap too, but other options include:

  • Emacs modes:
    • shell
    • term
    • comint
    • Slime (works with Common Lisps and Clojure, probably not with Arc)
  • ssfe (the frontend part of sirc)
  • jline (especially if the REPL is written in Java, which arc is not)
like image 30
Jouni K. Seppänen Avatar answered Nov 15 '22 09:11

Jouni K. Seppänen