禁用ohmyzsh自动更新

本文介绍了解决Mac终端使用ohmyzsh时首次启动延迟的问题。通过禁用ohmyzsh的自动更新检查功能,可以显著提高启动速度。文章提供了具体的配置文件修改步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

现象

每天第一次打开mac的终端时,最会卡一会儿才会进入ohmyzsh,再次打开则很快。发现这是ohmyzsh在自动检查更新,将自动更新检查关闭了就OK了。

打开个人目录下的ohmyzsh(zsh) 的配置文件: ~/.zshrc

找到DISABLE_AUTO_UPDATE一行,将行首的注释'#'去掉,则可禁用ohmyzsh 自动检查更新。

 

PS:如果想手动检查更新,可以手动执行

➜ ~ upgrade_oh_my_zsh
Updating Oh My Zsh
remote: Enumerating objects: 9, done.
remote: Counting objects: 100% (9/9), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 3), reused 4 (delta 2), pack-reused 0
展开对象中: 100% (5/5), 完成.
来自 https://github.com/robbyrussell/oh-my-zsh
* branch master -> FETCH_HEAD
a2995014..fabee559 master -> origin/master
更新 a2995014..fabee559
Fast-forward
plugins/ssh-agent/ssh-agent.plugin.zsh | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
当前分支 master 是最新的。
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/
Hooray! Oh My Zsh has been updated and/or is at the current version.
To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh
Get your Oh My Zsh swag at: https://shop.planetargon.com/

 

 

转载于:https://www.cnblogs.com/itszhengkun/p/7965457.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值