Currently, I have bindings for comint-previous-matching-input-from-input
and comint-next-matching-input-from-input
.
My problem is this. Suppose I am on a prompt with some text (say, "x = ") and issue previous
- the latest command shows up (e.g. "x = 10"). But now, when I issue next
, nothing happens. I understand - no input is matched, so the latest command stays. Instead, I want the original text to show up ("x = ") (if you are familiar with zsh input completion, this is it).
How can I do this?