Subject: Re: bug#36034: [PATCH] Zsh extended_history shows up in comint input ring

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 23 Jun 2019 18:53:54 +0200

Matthew Bauer <[email-masked]> writes:

> The format of this line looks like this:
>
> : <beginning time>:<elapsed seconds>;<command>
>
> This patch just skips those timestamp to get the <command> part.

[...]

> --- a/lisp/comint.el
> +++ b/lisp/comint.el
> @@ -976,7 +976,11 @@ See also `comint-input-ignoredups' and `comint-write-input-ring'."
>                   (setq start
>                         (if (re-search-backward comint-input-ring-separator
>                                                 nil t)
> -                           (match-end 0)
> +                           (progn
> +                             ;; Skip zsh extended_history stamps
> +                             (re-search-forward ": [[:digit:]]+:[[:digit:]]+;" nil t)
> +
> +                             (match-end 0))
>                           (point-min)))
>                   (setq history (buffer-substring start end))
>                   (goto-char start)

I'm not that familiar with the comint/shell code...  but this is done
in the central comint code, so it would do this for all the modes that
use comint?  Couldn't that lead to problems in these other modes that
aren't doing this timestamp thing?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no