diff options
author | Kjetil Orbekk <kj@orbekk.com> | 2024-01-06 14:17:12 -0500 |
---|---|---|
committer | Kjetil Orbekk <kj@orbekk.com> | 2024-01-06 14:17:12 -0500 |
commit | df17eea6b145553b89f2f10a18d812c366883325 (patch) | |
tree | 4bb676dee2186452970bc4ca1197d5ccbe1f5ddc | |
parent | b217d9ba56368761146c0a00139d92bcfab708e8 (diff) |
improve shell history
-rw-r--r-- | emacs/.config/emacs-kj/lisp/kj-history.el | 5 |
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 () |