WindTerm icon indicating copy to clipboard operation
WindTerm copied to clipboard

为什么在 zsh 下,不记录历史命令呢?

Open QianLongGit opened this issue 1 year ago • 4 comments

历史命令,只在 bash 下才记录,切换到 zsh 后,就不记录历史命令了。这是设计如此的吗?

QianLongGit avatar Jul 27 '22 06:07 QianLongGit

https://github.com/kingToolbox/WindTerm/issues/773#issuecomment-1132051731

issakk avatar Aug 06 '22 04:08 issakk

As @issakk mentioned, WindTerm will only display the autocomplete list when it finds the command prompt. Your zsh may use a custom command prompt, so there is no autocompletion.

This is not by design, you just need to modify the "prompt.line.linux" in the WindTerm_install_path/terminal/schemes/linux/linux.lexer to recognize your command prompt to restore the auto completion feature.

If possible, you can also provide me with a screenshot of the command prompt so that I can customize the rules for you.

kingToolbox avatar Aug 23 '22 02:08 kingToolbox

I think the quick solution is change your zsh theme - make your prompt more like the default prompt .

ZSH_THEME="essembeh"

This zsh theme can work good with history.

CanvasQAQ avatar Apr 26 '23 13:04 CanvasQAQ

Seems like if you put a '#' at the beginning of a command line, it's recognized

before: image

after: image

M0ng0lFalcon avatar Apr 30 '24 08:04 M0ng0lFalcon