From df17eea6b145553b89f2f10a18d812c366883325 Mon Sep 17 00:00:00 2001 From: Kjetil Orbekk Date: Sat, 6 Jan 2024 14:17:12 -0500 Subject: improve shell history --- emacs/.config/emacs-kj/lisp/kj-history.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'emacs') diff --git a/emacs/.config/emacs-kj/lisp/kj-history.el b/emacs/.config/emacs-kj/lisp/kj-history.el index 0b70508..2e90e81 100644 --- a/emacs/.config/emacs-kj/lisp/kj-history.el +++ b/emacs/.config/emacs-kj/lisp/kj-history.el @@ -23,7 +23,10 @@ (let ((result)) (save-match-data (while (re-search-forward kj/history-regexp nil t) - (push (match-string-no-properties 1) result))) + (let ((command + ;; Fix up multi-line commands. + (string-replace "\\\\n" "\\\n" (match-string-no-properties 1)))) + (push command result)))) result))) (defun kj/consult-history () -- cgit v1.2.3