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

Add History Support #58

Open
FOSSilizedDaemon opened this issue Sep 18, 2022 · 1 comment
Open

Add History Support #58

FOSSilizedDaemon opened this issue Sep 18, 2022 · 1 comment

Comments

@FOSSilizedDaemon
Copy link

Is there any chance that history support could get added?

@vindarel
Copy link
Contributor

It sounds possible, because the binding is now available in cl-readline (it was missing when cl-repl started, IIRC).

  ;; read history before startup.
  (rl:read-history "/tmp/readline_history")

(rl:readline :prompt (prompt)
                               :add-history t)

  (rl:write-history "/tmp/readline_history")

possibly, with one or two global variables that control if we enable the read/write history.

digikar99 added a commit to lisp-maintainers/cl-repl that referenced this issue Jul 18, 2023
…/cl-repl/issues/1, koji-kojiro#58, koji-kojiro#56)

This commit includes a number of inter-related changes:

- A history file is introduced that stores entries in a string-by-string manner,
similar to SLIME. This easily takes care of inputs containing multiple lines.
- To be able to edit a multiline input, the #\newline and #\return signals are
mapped to MAY-BE-INSERT-NEWLINE, which either inserts a newline character, or
completes the command using rl_newline.
- For correct keyboard navigation in the presence of color codes, prompt ignore
codes defined by libreadline are used.
- Some common keys are bound to commands for visiting previous/next line, and
for previous/next input.
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