zsh使用笔记

{post_link shell/'zsh和bash共用自定义配置' }

不共享历史

zsh默认会在不同的会话之间共享历史,禁用这个特性:

# https://github.com/ohmyzsh/ohmyzsh/issues/2537
echo "unsetopt share_history" >> ~/.zshrc

禁止zsh解析*

echo "setopt no_nomatch" >> ~/.zshrc

zsh不兼容的坑-zsh:no matches found

自带的rm *提醒

$ rm -f *
zsh: sure you want to delete all 3 files in /tmp/test [yn]?

明明已经用了-f但还是有prompt,很烦。可以这样关掉:

echo "setopt rmstarsilent" >> ~/.zshrc

参考:https://github.com/ohmyzsh/ohmyzsh/issues/10268

多行命令换行

Alt+Enter

posted @ 2024-09-28 14:11  寻找繁星  阅读(3)  评论(0编辑  收藏  举报