[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#36034: [PATCH] Zsh extended_history shows up in comint input ring
From: |
Stefan Kangas |
Subject: |
bug#36034: [PATCH] Zsh extended_history shows up in comint input ring |
Date: |
Mon, 20 Jan 2020 20:43:51 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Matthew Bauer <mjbauer95@gmail.com> writes:
>
>> (setq start
>> (if (re-search-backward comint-input-ring-separator
>> nil t)
>> - (match-end 0)
>> - (point-min)))
>> + (progn
>> + (when comint-input-ring-file-prefix
>> + ;; Skip zsh extended_history stamps
>> + (re-search-forward
>> comint-input-ring-file-prefix
>> + nil t))
>> + (match-end 0))
>
> Hm... I don't think this is right, either. If the re-search-forward
> fails, then (match-end 0) will fail, too. And since (if I understood
> correctly), the prefix will follow on directly from where point it,
> using looking-at would be better, anyway...
>
>> ;; 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)))
>
> And this bit didn't apply.
That was 7 months ago. Did you have any time to look into the
comments by Lars above? Thanks.
Best regards,
Stefan Kangas
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#36034: [PATCH] Zsh extended_history shows up in comint input ring,
Stefan Kangas <=