summaryrefslogtreecommitdiff
path: root/lisp/shell.el
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-08-10 13:09:57 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2020-08-10 13:10:09 +0200
commitf7421039fb15123dbbda047e23504dd1771183b5 (patch)
treee8e26e47f5e794dac039eedcea09bc3a6df10d50 /lisp/shell.el
parentb82330077556ca07b7e76951863a08100a6b0f82 (diff)
downloademacs-f7421039fb15123dbbda047e23504dd1771183b5.tar.gz
Add zsh extended_history handling for comint.el input ring
* lisp/comint.el (comint-input-ring-file-prefix): New variable (bug#36034). (comint-read-input-ring): Use it. * lisp/shell.el (shell-mode): Set it.
Diffstat (limited to 'lisp/shell.el')
-rw-r--r--lisp/shell.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/shell.el b/lisp/shell.el
index dc528412a62..f5e18bbc728 100644
--- a/lisp/shell.el
+++ b/lisp/shell.el
@@ -619,7 +619,12 @@ buffer."
;; Bypass a bug in certain versions of bash.
(when (string-equal shell "bash")
(add-hook 'comint-preoutput-filter-functions
- #'shell-filter-ctrl-a-ctrl-b nil t)))
+ #'shell-filter-ctrl-a-ctrl-b nil t))
+
+ ;; Skip extended history for zsh.
+ (when (string-equal shell "zsh")
+ (setq-local comint-input-ring-file-prefix
+ ": [[:digit:]]+:[[:digit:]]+;")))
(comint-read-input-ring t)))
(defun shell-apply-ansi-color (beg end face)