Skip to content

link

link causes a local snippet to be symlinked into the Zinit snippets directory rather than copied. This keeps the local source file in sync automatically.

Terminal window
zi ice link
zi snippet /path/to/local/file.zsh

For local file snippets (non-URL), Zinit normally copies the file into its snippets cache. With link, a symlink is created instead. Changes to the source file are immediately reflected without needing to update the snippet.

Uses relative symlinks when realpath version 8.23 or later is available.

Does not apply to URL-based snippets. Does not work with plugins.

Terminal window
# Symlink a local dotfiles script rather than copying it
zi ice link
zi snippet ~/dotfiles/zsh/aliases.zsh
  • id-as