我想在shell-mode中使用icicle-comint-search,但它经常失败,错误消息如下
byte-code: No search contexts for `\^\[\^#\$%>
]\*\[#\$%>] \*\\S-\.\*'当然,我在zsh中的shell提示符不符合该正则表达式。B
我尝试通过setq更改icicle-search-context-regexp,以满足我的zsh提示。但是,当我发出icicle-comint-search命令时,错误消息再次出现。当我检查icicle-search-context-regexp的变量值时,它再次被重置为默认值。
如何更改它以满足zsh提示符?
发布于 2013-06-15 10:47:41
icicle-comint-search使用这个正则表达式:(concat comint-prompt-regexp "\\S-.*")。
因此,您可以更改变量comint-prompt-regexp的值来更改搜索正则表达式。您可以在模式挂钩(例如,comint-mode-hook)中设置该变量。请注意,comint-prompt-regexp的文档字符串表明,只有在comint-use-prompt-regexp为非nil时才使用它,但对于icicle-comint-search,它总是被使用。我已经更新了提到comint-prompt-regexp的icicle-comint-search文档字符串。
https://stackoverflow.com/questions/17024862
复制相似问题