I'd like to use icicle-comint-search in shell-mode, but it used to be failed with error message like this
byte-code: No search contexts for `\^\[\^#\$%>
]\*\[#\$%>] \*\\S-\.\*'
Of course my shell prompt in zsh does not meet that regular expression. B
I tried to change icicle-search-context-regexp via setq to meet my zsh prompt. But when I issue icicle-comint-search the error message comes again. When I examine variable value of icicle-search-context-regexp, it was reset to its default value again.
How could I change it to meet my zsh prompt?
icicle-comint-searchuses this regexp:(concat comint-prompt-regexp "\\S-.*").So you can change the value of variable
comint-prompt-regexpto change the search regexp. You can set that variable in a mode hook, for example (e.g.,comint-mode-hook). Note that the doc string forcomint-prompt-regexpsays that it is used only ifcomint-use-prompt-regexpis non-nil, but foricicle-comint-searchit is always used. I've updated theicicle-comint-searchdoc string to mentioncomint-prompt-regexp.