Skip to content

reset

reset discards local changes in the plugin directory before pulling updates. For git plugins it runs git reset --hard HEAD; for SVN snippets it runs svn revert; for file snippets and gh-r plugins it runs rm -rf *.

Terminal window
zi ice reset

When atclone'' or other hooks modify files in the plugin directory, subsequent git pull calls may report conflicts. reset clears those local modifications before the pull so updates proceed cleanly.

reset is a flag ice — it takes no value. It runs before git pull during zinit update.

Terminal window
# LS_COLORS: atclone generates c.zsh; reset clears it before update
zi ice reset atclone"dircolors -b LS_COLORS > c.zsh" atpull'%atclone' pick"c.zsh" nocompile'!'
zi light trapd00r/LS_COLORS
  • atclone
  • atpull
  • run-atpull