我决定精简我的条目.zshrc
并整理oh-my-zsh
条目。现在似乎zsh
可以自动安装引用的插件并自动更新它们,这是我想要实现的。但是,每次我运行终端时,我都会得到以下输出:
[zplug] Start to update 0 plugins in parallel
[zplug] Elapsed time: 0.0074 sec.
==> Updating finished successfully!
当然不需要它,我希望将其删除。
这是.zshrc
我有oh-my-zsh
条目的部分:
# Check if zplug is installed
[ ! -d ~/.zplug ] && git clone https://github.com/zplug/zplug ~/.zplug
source ~/.zplug/init.zsh && zplug update
zplug 'zplug/zplug', hook-build:'zplug --self-manage'
zplug "seebi/dircolors-solarized", ignore:"*", as:plugin
zplug "plugins/mvn", from:oh-my-zsh
zplug "plugins/gradle", from:oh-my-zsh
zplug "plugins/git", from:oh-my-zsh
zplug "plugins/sudo", from:oh-my-zsh
zplug "plugins/dnf", from:oh-my-zsh
# Supports checking out a specific branch/tag/commit
zplug "b4b4r07/enhancd", at:v1
# Support bitbucket
zplug "b4b4r07/hello_bitbucket", \
from:bitbucket, \
as:command, \
use:"*.sh"
zplug "zsh-users/zsh-completions", defer:0
zplug "zsh-users/zsh-autosuggestions", defer:2, on:"zsh-users/zsh-completions"
zplug "zsh-users/zsh-syntax-highlighting", defer:3, on:"zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-history-substring-search", defer:3, on:"zsh-users/zsh-syntax-highlighting"
# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
# Then, source plugins and add commands to $PATH
zplug load
根据查看https://github.com/zplug/zplug上的代码,这些消息由 zplug 通过 printf 发送到标准输出,因此您可以通过更改此行来使它们静音:
对此:
要完全禁止更新,只需删除更新命令: