1

zsh enable bash * Asterisk wildcard function

 2 years ago
source link: https://www.logcg.com/archives/3505.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
最近更新:11th 5月, 2021

最近发现服务器每次 apt upgrade 都非常慢,究其原因,还是一大堆不用的内核每次都要重新生成,清理的时候遇到一个问题,*号匹配不生效,每次都必须手动输入完整的内核名称才能将其卸载。

一通踩坑后发现,原来是因为我用了 zsh,而 zsh 默认是不支持 * 号通配的!要开启这个功能也很简单,找到你的 zsh 配置文件 vi ~/.zshrc  ,在这个文件末尾新增 setopt nonomatch 保存即可。

当然,你还需要重新打开终端来让配置加载,或者也可以不退出,手动触发配置加载: source ~/.zshrc

这下就可以愉快的使用通配符了(小心使用)。

本文由 落格博客 原创撰写:落格博客 » zsh 启用 bash * 星号通配符功能

转载请保留出处和原文链接:https://www.logcg.com/archives/3505.html

About the Author

9199db428730d8ac5dd90f8c180f8713?s=64&d=mm&r=pg

落格博客

如非声明,本人所著文章均为原创手打,转载请注明本页面链接和我的名字。

发表评论 取消回复

您的电子邮箱地址不会被公开。 必填项已用*标注

评论 *

显示名称 *

电子邮箱地址 *

网站地址

在此浏览器中保存我的显示名称、邮箱地址和网站地址,以便下次评论时使用。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK