zsh enable bash * Asterisk wildcard function

Recently I found that the server is very slow every time apt upgrade,The reason,There are still a lot of unused kernels that have to be regenerated every time,Encountered a problem while cleaning up,*Number matching does not take effect,You must manually enter the full kernel name each time to uninstall it。

Found after stepping on the pit,It turned out to be because I used zsh,and zsh The default is not supported * No. wildcard! It’s easy to turn on this feature,Find your zsh configuration file we ~/.zshrc ,Add at the end of this file setopt nonomatch Just save。

of course,You also need to reopen the terminal to let the configuration load,Or you can not quit,Manually trigger configuration loading: source ~/.zshrc

Now you can use wildcards happily (use carefully)。

References

Original article written by Gerber drop-off:R0uter's Blog » zsh enable bash * Asterisk wildcard function

Reproduced Please keep the source and description link:https://www.logcg.com/archives/3505.html

By R0uter's Blog

The non-declaration,I have written articles are original,Reproduced, please indicate the link on this page and my name。

Leave a comment

Your email address will not be published. Required fields are marked *