summaryrefslogtreecommitdiff
path: root/emacs/.config/emacs-kj/lisp/kj-history.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.config/emacs-kj/lisp/kj-history.el')
-rw-r--r--emacs/.config/emacs-kj/lisp/kj-history.el5
1 files changed, 4 insertions, 1 deletions
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 ()