{"id":13897651,"url":"https://github.com/psprint/Zinit-4","last_synced_at":"2025-07-17T14:32:33.729Z","repository":{"id":190945957,"uuid":"683472355","full_name":"psprint/Zinit-4","owner":"psprint","description":"NG Flexible and fast Zsh plugin manager","archived":false,"fork":false,"pushed_at":"2023-10-24T02:00:30.000Z","size":7190,"stargazers_count":27,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-25T03:32:56.143Z","etag":null,"topics":["console","tui","zsh","zsh-plugin","zsh-plugin-manager"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/psprint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null}},"created_at":"2023-08-26T17:21:55.000Z","updated_at":"2024-09-21T13:24:37.000Z","dependencies_parsed_at":"2023-08-27T09:44:00.891Z","dependency_job_id":"5046bb15-1f76-4beb-b484-d1532076a7f6","html_url":"https://github.com/psprint/Zinit-4","commit_stats":null,"previous_names":["psprint/ziinit"],"tags_count":62,"template":false,"template_full_name":null,"purl":"pkg:github/psprint/Zinit-4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psprint%2FZinit-4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psprint%2FZinit-4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psprint%2FZinit-4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psprint%2FZinit-4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psprint","download_url":"https://codeload.github.com/psprint/Zinit-4/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psprint%2FZinit-4/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265616828,"owners_count":23798903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["console","tui","zsh","zsh-plugin","zsh-plugin-manager"],"created_at":"2024-08-06T18:03:46.904Z","updated_at":"2025-07-17T14:32:33.320Z","avatar_url":"https://github.com/psprint.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\n\n- [Zinit\u003ca name=\"zinit\"\u003e\u003c/a\u003e](#zinit)\n  - [Zinit Wiki\u003ca name=\"zinit-wiki\"\u003e\u003c/a\u003e](#zinit-wiki)\n  - [Install\u003ca name=\"install\"\u003e\u003c/a\u003e](#install)\n    - [Via AppImage (recommended)\u003ca name=\"appimage\"\u003e\u003c/a\u003e](#via-appimage-recommended)\n    - [Automatic\u003ca name=\"automatic\"\u003e\u003c/a\u003e](#automatic)\n    - [Manual\u003ca name=\"manual\"\u003e\u003c/a\u003e](#manual)\n  - [Usage\u003ca name=\"usage\"\u003e\u003c/a\u003e](#usage)\n    - [Introduction\u003ca name=\"introduction\"\u003e\u003c/a\u003e](#introduction)\n    - [Plugins and snippets\u003ca name=\"plugins-and-snippets\"\u003e\u003c/a\u003e](#plugins-and-snippets)\n    - [Upgrade Zinit and plugins\u003ca name=\"upgrade-zinit-and-plugins\"\u003e\u003c/a\u003e](#upgrade-zinit-and-plugins)\n    - [Turbo and lucid\u003ca name=\"turbo-and-lucid\"\u003e\u003c/a\u003e](#turbo-and-lucid)\n    - [Migration\u003ca name=\"migration\"\u003e\u003c/a\u003e](#migration)\n  - [Frequently Asked Questions\u003ca name=\"frequently-asked-questions\"\u003e\u003c/a\u003e](#frequently-asked-questions)\n    - [Use `zi ice svn` if a plugin/snippet requires an entire subdirectory\u003ca name=\"use-zi-ice-svn-if-a-pluginsnippet-requires-an-entire-subdirectory\"\u003e\u003c/a\u003e](#use-zi-ice-svn-if-a-pluginsnippet-requires-an-entire-subdirectory)\n    - [Use `zi ice as'completion'` to directly add single file completion snippets\u003ca name=\"use-zi-ice-ascompletion-to-directly-add-single-file-completion-snippets\"\u003e\u003c/a\u003e](#use-zi-ice-ascompletion-to-directly-add-single-file-completion-snippets)\n    - [More Examples\u003ca name=\"more-examples\"\u003e\u003c/a\u003e](#more-examples)\n- [How to Use\u003ca name=\"how-to-use\"\u003e\u003c/a\u003e](#how-to-use)\n  - [Ice Modifiers\u003ca name=\"ice-modifiers\"\u003e\u003c/a\u003e](#ice-modifiers)\n    - [Cloning Options\u003ca name=\"cloning-options\"\u003e\u003c/a\u003e](#cloning-options)\n    - [Selection of Files (To Source, …)\u003ca name=\"selection-of-files-to-source-%E2%80%A6\"\u003e\u003c/a\u003e](#selection-of-files-to-source-)\n    - [Conditional Loading\u003ca name=\"conditional-loading\"\u003e\u003c/a\u003e](#conditional-loading)\n    - [Plugin Output\u003ca name=\"plugin-output\"\u003e\u003c/a\u003e](#plugin-output)\n    - [Completions\u003ca name=\"completions\"\u003e\u003c/a\u003e](#completions)\n    - [Command Execution After Cloning, Updating or Loading\u003ca name=\"command-execution-after-cloning-updating-or-loading\"\u003e\u003c/a\u003e](#command-execution-after-cloning-updating-or-loading)\n    - [Sticky-Emulation Of Other Shells\u003ca name=\"sticky-emulation-of-other-shells\"\u003e\u003c/a\u003e](#sticky-emulation-of-other-shells)\n    - [Others\u003ca name=\"others\"\u003e\u003c/a\u003e](#others)\n    - [Order of Execution\u003ca name=\"order-of-execution\"\u003e\u003c/a\u003e](#order-of-execution)\n  - [Zinit Commands\u003ca name=\"zinit-commands\"\u003e\u003c/a\u003e](#zinit-commands)\n    - [Help\u003ca name=\"help\"\u003e\u003c/a\u003e](#help)\n    - [Loading and Unloading\u003ca name=\"loading-and-unloading\"\u003e\u003c/a\u003e](#loading-and-unloading)\n    - [Completions\u003ca name=\"completions-1\"\u003e\u003c/a\u003e](#completions)\n    - [Tracking of the Active Session\u003ca name=\"tracking-of-the-active-session\"\u003e\u003c/a\u003e](#tracking-of-the-active-session)\n    - [Reports and Statistics\u003ca name=\"reports-and-statistics\"\u003e\u003c/a\u003e](#reports-and-statistics)\n    - [Compiling\u003ca name=\"compiling\"\u003e\u003c/a\u003e](#compiling)\n    - [Other\u003ca name=\"other\"\u003e\u003c/a\u003e](#other)\n  - [Updating Zinit and Plugins\u003ca name=\"updating-zinit-and-plugins\"\u003e\u003c/a\u003e](#updating-zinit-and-plugins)\n  - [Completions\u003ca name=\"completions-2\"\u003e\u003c/a\u003e](#completions)\n    - [Calling `compinit` Without Turbo Mode\u003ca name=\"calling-compinit-without-turbo-mode\"\u003e\u003c/a\u003e](#calling-compinit-without-turbo-mode)\n    - [Calling `compinit` With Turbo Mode\u003ca name=\"calling-compinit-with-turbo-mode\"\u003e\u003c/a\u003e](#calling-compinit-with-turbo-mode)\n    - [Ignoring Compdefs\u003ca name=\"ignoring-compdefs\"\u003e\u003c/a\u003e](#ignoring-compdefs)\n    - [Disabling System-Wide `compinit` Call (Ubuntu)\u003ca name=\"disabling-system-wide-compinit-call-ubuntu\"\u003e\u003c/a\u003e](#disabling-system-wide-compinit-call-ubuntu)\n  - [Zinit Module\u003ca name=\"zinit-module\"\u003e\u003c/a\u003e](#zinit-module)\n  - [Hints and Tips\u003ca name=\"hints-and-tips\"\u003e\u003c/a\u003e](#hints-and-tips)\n    - [Using ZPFX variable](#using-zpfx-variable)\n    - [Customizing Paths\u003ca name=\"customizing-paths\"\u003e\u003c/a\u003e](#customizing-paths)\n    - [Non-GitHub (Local) Plugins\u003ca name=\"non-github-local-plugins\"\u003e\u003c/a\u003e](#non-github-local-plugins)\n    - [Extending Git\u003ca name=\"extending-git\"\u003e\u003c/a\u003e](#extending-git)\n    - [Use named directories for plugin dirs](#use-named-directories-for-plugin-dirs)\n  - [Changelog\u003ca name=\"changelog\"\u003e\u003c/a\u003e](#changelog)\n  - [Completion for Plugin IDs and Ices](#completion-for-plugin-ids-and-ices)\n  - [Support\u003ca name=\"support\"\u003e\u003c/a\u003e](#support)\n  - [Getting Help and Community\u003ca name=\"getting-help-and-community\"\u003e\u003c/a\u003e](#getting-help-and-community)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/zdharma-continuum/zinit\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/zdharma-continuum/zinit/images/zinit.png\"/\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n# Zinit\u003ca name=\"zinit\"\u003e\u003c/a\u003e\n\n[![MIT License][mit-badge]][mit-link] [![zinit version][ver-badge]][ver-link] [![zunit tests][tests-badge]][tests-link]\n[![Join the chat at https://gitter.im/zdharma-continuum/zinit][gitter-badge]][gitter-link]\n\n[Gitter chat][gitter-link]\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/zdharma-continuum/pm-perf-test\"\u003e\n\u003cimg width=\"550px\" src=\"https://raw.githubusercontent.com/zdharma-continuum/zinit/images/startup-times.png\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nThis is **`Zinit 4`** from the [original author](https://github.com/psprint). I've once removed the zinit repo from GitHub. This spawned a community-driven [zdharma-continuum](https://github.com/zdharma-continuum) org that revived all my projects (an also [z-shell](https://github.com/), which I advise to not use, as it seems to be a China, suspicious project). I've been submitting my code to @zdharma-continuum for a long time. It was a hard job as the PRs were merged slowly. Then they actually stopped to be merged, with PRs waiting there over a [**year**](https://github.com/zdharma-continuum/zinit/pull/333). So, as I have big plans for Zinit, I've started this **`Zinit 4`** fork. It's main innovations from @zdharma-continuum are:\n- AppImage distribution ([release link](https://github.com/psprint/Zinit-4/releases/tag/v4.0.1)),\n- action complete – press Alt-Shift-A and Alt-Shift-C to complete plugin names and ice modifiers,\n- themes – set `$ZITHEME` to one of `default`, `blue` and `gold` to set a color set to use for **`Zinit 4`** messages,\n- new ice `build''` which is equivalent of three other ices: `null configure make'install` and simply builds the project from sources, with support for autotools/CMake/Meson/Scons.\n\nThese are the most visible changes, but there are more (like e.g.: support for compiling with libraries from previously built projects/`$ZPFX`). For full list of Zinit 4 features, see [NEWS.md](NEWS.md).\n\n\n\n**`Zinit 4`** is a flexible and fast Zshell plugin manager that will allow you to install everything from GitHub and other\nsites. Its characteristics are:\n\n1. **`Zinit 4`** is currently the only plugin manager that provides Turbo mode, which yields **50-80% faster Zsh startup**\n   (i.e., the shell will start up to **5** times faster!). Check out a speed comparison with other popular plugin\n   managers [here](https://github.com/zdharma-continuum/pm-perf-test).\n\n2. The plugin manager gives **reports** from plugin loadings describing what **aliases**, functions, **bindkeys**, Zle\n   widgets, zstyles, **completions**, variables, `PATH` and `FPATH` elements a plugin has set up. This allows one to\n   quickly familiarize oneself with a new plugin and provides rich and easy-to-digest information which might be helpful\n   on various occasions.\n\n3. Supported is the unloading of plugin and ability to list, (un)install and **selectively disable**, **enable**\n   plugin's completions.\n\n4. The plugin manager supports loading plugins and libraries from Oh My Zsh or Prezto. However, the implementation isn't\n   framework-specific and doesn't bloat the plugin manager with such code (more on this topic can be found on the Wiki,\n   in the [Introduction](https://zdharma-continuum.github.io/zinit/wiki/INTRODUCTION/#oh_my_zsh_prezto)).\n\n5. The system does not use `$FPATH`, loading multiple plugins doesn't clutter `$FPATH` with the same number of entries\n   (e.g. `10`, `15` or more). Code is immune to `KSH_ARRAYS` and other options typically causing compatibility problems.\n\n6. **`Zinit 4`** supports special, dedicated **packages** that offload the user from providing long and complex commands. See\n   the [zinit-packages repository](https://github.com/zdharma-continuum/zinit-packages) for a growing, complete list of\n   **`Zinit 4`** packages and the [Wiki page](https://zdharma-continuum.github.io/zinit/wiki/Zinit-Packages/) for an article\n   about the feature.\n\n7. Also, specialized **`Zinit 4`** extensions — called **annexes** — have the ability to extend the plugin manager with new\n   commands, URL-preprocessors (used by e.g.:\n   [zinit-annex-readurl](https://github.com/zdharma-continuum/zinit-annex-readurl) annex), post-install and post-update\n   hooks, and much more. See the [zdharma-continuum](https://github.com/zdharma-continuum) organization for a growing,\n   complete list of available **`Zinit 4`** extensions and refer to the\n   [Wiki article](https://zdharma-continuum.github.io/zinit/wiki/Annexes/) for an introduction on creating your annex.\n\n## **`Zinit 4`** Wiki\u003ca name=\"zinit-wiki\"\u003e\u003c/a\u003e\n\nThe information in this README is complemented by the [**`Zinit 4`** Wiki](https://zdharma-continuum.github.io/zinit/wiki/). The\nREADME is an introductory overview of Zinit, while the Wiki gives complete information with examples. Make sure to read\nit to get the most out of Zinit.\n\n## Install\u003ca name=\"install\"\u003e\u003c/a\u003e\n\n### Via AppImage (recommended)\u003ca name=\"appimage\"\u003e\u003c/a\u003e\n\nZinit 4 is the first Zsh plugin manager that's available as [AppImage](https://github.com/psprint/Zinit-4/releases/tag/v4.0.1). You can simply download the AppImage file `z4-4.0.1.AppImage` and do:\n\n```zsh\n# Add to .zshrc\neval \"$(…\u003cpath-to-download-dir\u003e…/z4-4.0.1,AppImage -ie)\"\n```\n\nThis command will load **`Zinit 4`**. The options are `-i` or `--install` and `-e` or `--eval`. You can also just install Zinit4, via:\n\n```zsh\n…/z4-4.0.1,AppImage --install\n```\nand then load it normally via:\n\n```zsh\nsource ~/.local/share/zinit/zinit.bin/zinit.zsh\n```\n\nadded to Zshrc. The `--install` command should be also placed there, it installs **`Zinit 4`** just **once**\n\n### Automatic\u003ca name=\"automatic\"\u003e\u003c/a\u003e\n\nThe easiest way to install **`Zinit 4`** is to execute:\n\n```bash\nbash -c \"$(curl --fail --show-error --silent --location https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh)\"\n```\n\nThis will install **`Zinit 4`** in `~/.local/share/zinit/zinit.git`. `.zshrc` will be updated with three lines of code that will\nbe added to the bottom. The lines will be sourcing `zinit.zsh` and setting up completion for command `zinit`.\n\nAfter installing and reloading the shell, compile **`Zinit 4`** via:\n\n```zsh\nzinit self-update\n```\n\n### Manual\u003ca name=\"manual\"\u003e\u003c/a\u003e\n\nIn your `.zshrc`, add the following snippet\n\n```zsh\nZINIT_HOME=\"${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git\"\n[ ! -d $ZINIT_HOME ] \u0026\u0026 mkdir -p \"$(dirname $ZINIT_HOME)\"\n[ ! -d $ZINIT_HOME/.git ] \u0026\u0026 git clone https://github.com/zdharma-continuum/zinit.git \"$ZINIT_HOME\"\nsource \"${ZINIT_HOME}/zinit.zsh\"\n```\n\n[compinit](http://zsh.sourceforge.net/Doc/Release/Completion-System.html#Initialization)):\n\nIf you source `zinit.zsh` after `compinit`, add the following snippet after sourcing `zinit.zsh`:\n\n```zsh\nautoload -Uz _zinit\n(( ${+_comps} )) \u0026\u0026 _comps[zinit]=_zinit\n```\n\nReload Zsh to install Zinit:\n\n```zsh\nexec zsh\n```\n\nVarious paths can be customized; see section [Customizing Paths](#customizing-paths).\n\n## Usage\u003ca name=\"usage\"\u003e\u003c/a\u003e\n\n### Introduction\u003ca name=\"introduction\"\u003e\u003c/a\u003e\n\n[Click here to read the introduction to Zinit](https://zdharma-continuum.github.io/zinit/wiki/INTRODUCTION/). It\nexplains basic usage and some of the more unique features of Zinit, such as the Turbo mode. If you're new to Zinit, we\nrecommend you read it at least once.\n\n### Plugins and snippets\u003ca name=\"plugins-and-snippets\"\u003e\u003c/a\u003e\n\nPlugins can be loaded using `load` or `light`.\n\n```zsh\nzinit load  \u003crepo/plugin\u003e # Load with reporting/investigating.\nzinit light \u003crepo/plugin\u003e # Load without reporting/investigating.\n```\n\nIf you want to source local or remote files (using direct URL), you can do so with `snippet`.\n\n```zsh\nzinit snippet \u003cURL\u003e\n```\n\nSuch lines should be added to `.zshrc`. Snippets are cached locally. Use the `-f` option to download a new version of a\nsnippet or `zinit update {URL}`. You can also use `zinit update --all` to update all snippets (and plugins).\n\n**Example**\n\n```zsh\n# Plugin history-search-multi-word loaded with investigating.\nzinit load zdharma-continuum/history-search-multi-word\n\n# Two regular plugins loaded without investigating.\nzinit light zsh-users/zsh-autosuggestions\nzinit light zdharma-continuum/fast-syntax-highlighting\n\n# Snippet\nzinit snippet https://gist.githubusercontent.com/hightemp/5071909/raw/\n```\n\n**Prompt(Theme) Example**\n\nThis is [powerlevel10k](https://github.com/romkatv/powerlevel10k), [pure](https://github.com/sindresorhus/pure),\n[starship](https://github.com/starship/starship) sample:\n\n```zsh\n# Load powerlevel10k theme\nzinit ice depth\"1\" # git clone depth\nzinit light romkatv/powerlevel10k\n\n# Load pure theme\nzinit ice pick\"async.zsh\" src\"pure.zsh\" # with zsh-async library that's bundled with it.\nzinit light sindresorhus/pure\n\n# Load starship theme\n# line 1: `starship` binary as command, from github release\n# line 2: starship setup at clone(create init.zsh, completion)\n# line 3: pull behavior same as clone, source init.zsh\nzinit ice as\"command\" from\"gh-r\" \\\n          atclone\"./starship init zsh \u003e init.zsh; ./starship completions zsh \u003e _starship\" \\\n          atpull\"%atclone\" src\"init.zsh\"\nzinit light starship/starship\n```\n\n### Upgrade **`Zinit 4`** and plugins\u003ca name=\"upgrade-zinit-and-plugins\"\u003e\u003c/a\u003e\n\n**`Zinit 4`** can be updated to `self-update` and plugins to `update`.\n\n```zsh\n# Self update\nzinit self-update\n\n# Plugin update\nzinit update\n\n# Plugin parallel update\nzinit update --parallel\n\n# Increase the number of jobs in a concurrent-set to 40\nzinit update --parallel 40\n```\n\n### Turbo and lucid\u003ca name=\"turbo-and-lucid\"\u003e\u003c/a\u003e\n\nTurbo and lucid are the most used options.\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eTurbo Mode\u003c/b\u003e\u003c/summary\u003e\nTurbo mode is the key to performance. It can be loaded asynchronously, which makes a huge difference when the amount of plugins increases.\n\nUsually used as `zinit ice wait\"\u003cSECONDS\u003e\"`, let's use the previous example:\n\n```zsh\nzinit ice wait    # wait is the same as wait\"0\"\nzinit load zdharma-continuum/history-search-multi-word\n\nzinit ice wait\"2\" # load after 2 seconds\nzinit load zdharma-continuum/history-search-multi-word\n\nzinit ice wait    # also be used in `light` and `snippet`\nzinit snippet https://gist.githubusercontent.com/hightemp/5071909/raw/\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eLucid\u003c/b\u003e\u003c/summary\u003e\n\nTurbo mode is verbose, so you need an option for quiet.\n\nYou can use `lucid`:\n\n```zsh\nzinit ice wait lucid\nzinit load zdharma-continuum/history-search-multi-word\n```\n\n\u003c/details\u003e\n\n***F\u0026A:*** What is `ice`?\n\n`ice` is zinit's options command. The option melts like ice and is used only once. (more:\n[Ice Modifiers](#ice-modifiers))\n\n### Migration\u003ca name=\"migration\"\u003e\u003c/a\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eMigration from Oh-My-ZSH\u003c/b\u003e\u003c/summary\u003e\n\n**Basic**\n\n```zsh\nzinit snippet \u003cURL\u003e        # Raw Syntax with URL\nzinit snippet OMZ::\u003cPATH\u003e  # Shorthand OMZ/ (https://github.com/ohmyzsh/ohmyzsh/raw/master/)\nzinit snippet OMZL::\u003cPATH\u003e # Shorthand OMZ/lib/\nzinit snippet OMZT::\u003cPATH\u003e # Shorthand OMZ/themes/\nzinit snippet OMZP::\u003cPATH\u003e # Shorthand OMZ/plugins/\n```\n\n**Library**\n\nImporting the [clipboard](https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh) and\n[termsupport](https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/termsupport.zsh) Oh-My-Zsh Library Sample:\n\n```zsh\n# Raw Syntax\nzi snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/clipboard.zsh\nzi snippet https://github.com/ohmyzsh/ohmyzsh/blob/master/lib/termsupport.zsh\n\n# OMZ Shorthand Syntax\nzi snippet OMZ::lib/clipboard.zsh\nzi snippet OMZ::lib/termsupport.zsh\n\n# OMZL Shorthand Syntax\nzi snippet OMZL::clipboard.zsh\nzi snippet OMZL::termsupport.zsh\n```\n\n**Theme**\n\nTo use **themes** created for Oh My Zsh you might want to first source the `git` library there.\n\nThen you can use the themes as snippets (`zinit snippet \u003cfile path or GitHub URL\u003e`). Some themes require not only Oh My\nZsh's Git **library**, but also Git **plugin** (error about `current_branch` may appear). Load this Git-plugin as\nsingle-file snippet directly from OMZ.\n\nMost themes require `promptsubst` option (`setopt promptsubst` in `zshrc`), if it isn't set, then prompt will appear as\nsomething like: `... $(build_prompt) ...`.\n\nYou might want to suppress completions provided by the git plugin by issuing `zinit cdclear -q` (`-q` is for quiet) –\nsee below **Ignoring Compdefs**.\n\nTo summarize:\n\n```zsh\n## Oh My Zsh Setting\nZSH_THEME=\"robbyrussell\"\n\n## Zinit Setting\n# Must Load OMZ Git library\nzi snippet OMZL::git.zsh\n\n# Load Git plugin from OMZ\nzi snippet OMZP::git\nzi cdclear -q # \u003c- forget completions provided up to this moment\n\nsetopt promptsubst\n\n# Load Prompt\nzi snippet OMZT::robbyrussell\n```\n\nExternal Theme Sample: [NicoSantangelo/Alpharized](https://github.com/nicosantangelo/Alpharized)\n\n```zsh\n## Oh My Zsh Setting\nZSH_THEME=\"alpharized\"\n\n## Zinit Setting\n# Must Load OMZ Git library\nzi snippet OMZL::git.zsh\n\n# Load Git plugin from OMZ\nzi snippet OMZP::git\nzi cdclear -q # \u003c- forget completions provided up to this moment\n\nsetopt promptsubst\n\n# Load Prompt\nzi light NicoSantangelo/Alpharized\n```\n\n## Frequently Asked Questions\u003ca name=\"frequently-asked-questions\"\u003e\u003c/a\u003e\n\nError occurs when loading OMZ's theme.\n\nIf the `git` library will not be loaded, the following errors will appear:\n\n```zsh\n........:1: command not found: git_prompt_status\n........:1: command not found: git_prompt_short_sha\n```\n\n**Plugin**\n\nIf it consists of a single file, you can just load it.\n\n```zsh\n## Oh-My-Zsh Setting\nplugins=(\n  git\n  dotenv\n  rake\n  rbenv\n  ruby\n)\n\n## Zinit Setting\nzi snippet OMZP::git\nzi snippet OMZP::dotenv\nzi snippet OMZP::rake\nzi snippet OMZP::rbenv\nzi snippet OMZP::ruby\n```\n\n### Use `zi ice svn` if a plugin/snippet requires an entire subdirectory\u003ca name=\"use-zi-ice-svn-if-a-pluginsnippet-requires-an-entire-subdirectory\"\u003e\u003c/a\u003e\n\n1. [gitfast](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/gitfast)\n2. [osx](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/osx)\n\n```zsh\nzi ice svn\nzi snippet OMZP::gitfast\n\nzi ice svn\nzi snippet OMZP::osx\n```\n\n### Use `zi ice as'completion'` to directly add single file completion snippets\u003ca name=\"use-zi-ice-ascompletion-to-directly-add-single-file-completion-snippets\"\u003e\u003c/a\u003e\n\n1. [docker](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker)\n2. [fd](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/fd)\n\n```zsh\nzi ice as\"completion\"\nzi snippet OMZP::docker/_docker\n\nzi ice as\"completion\"\nzi snippet OMZP::fd/_fd\n```\n\n[Find more information on Oh-My-Zsh + **`Zinit 4`** on the Wiki](https://zdharma-continuum.github.io/zinit/wiki/Example-Oh-My-Zsh-setup/)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eMigration from Prezto\u003c/b\u003e\u003c/summary\u003e\n\n**Basic**\n\n```zsh\nzi snippet \u003cURL\u003e        # Raw Syntax with URL\nzi snippet PZT::\u003cPATH\u003e  # Shorthand PZT/ (https://github.com/sorin-ionescu/prezto/tree/master/)\nzi snippet PZTM::\u003cPATH\u003e # Shorthand PZT/modules/\n```\n\n**Modules**\n\nImporting the [environment](https://github.com/sorin-ionescu/prezto/tree/master/modules/environment) and\n[terminal](https://github.com/sorin-ionescu/prezto/tree/master/modules/terminal) Prezto Modules Sample:\n\n```zsh\n## Prezto Setting\nzstyle ':prezto:load' pmodule 'environment' 'terminal'\n\n## Zinit Setting\n# Raw Syntax\nzi snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/environment/init.zsh\nzi snippet https://github.com/sorin-ionescu/prezto/blob/master/modules/terminal/init.zsh\n\n# PZT Shorthand Syntax\nzi snippet PZT::modules/environment\nzi snippet PZT::modules/terminal\n\n# PZTM Shorthand Syntax\nzi snippet PZTM::environment\nzi snippet PZTM::terminal\n```\n\nUse `zinit ice svn` if multiple files require an entire subdirectory. Like\n[docker](https://github.com/sorin-ionescu/prezto/tree/master/modules/docker),\n[git](https://github.com/sorin-ionescu/prezto/tree/master/modules/git):\n\n```zsh\nzi ice svn\nzi snippet PZTM::docker\n\nzi ice svn\nzi snippet PZTM::git\n```\n\nUse `zinit ice as\"null\"` if don't exist `*.plugin.zsh`, `init.zsh`, `*.zsh-theme*` files in module. Like\n[archive](https://github.com/sorin-ionescu/prezto/tree/master/modules/archive):\n\n```zsh\nzi ice svn as\"null\"\nzi snippet PZTM::archive\n```\n\nUse `zinit ice atclone\"git clone \u003crepo\u003e \u003clocation\u003e\"` if module have external module. Like\n[completion](https://github.com/sorin-ionescu/prezto/tree/master/modules/completion):\n\n```zsh\nzi ice \\\n  atclone\"git clone --recursive https://github.com/zsh-users/zsh-completions.git external\" \\\n  blockf \\ # use blockf to prevent any unnecessary additions to fpath, as zinit manages fpath\n  svn\n\nzi snippet PZTM::completion\n```\n\n***F\u0026A:*** What is `zstyle`?\n\nRead [zstyle](http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fzutil-Module) doc (more:\n[What does `zstyle` do?](https://unix.stackexchange.com/questions/214657/what-does-zstyle-do)).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eMigration from Zgen\u003c/b\u003e\u003c/summary\u003e\n\n**Oh My Zsh**\n\nMore reference: check **Migration from Oh-My-ZSH**\n\n```zsh\n# Load ohmyzsh base\nzgen oh-my-zsh\nzi snippet OMZL::\u003cALL OF THEM\u003e\n\n# Load ohmyzsh plugins\nzgen oh-my-zsh \u003cPATH\u003e\nzi snippet OMZ::\u003cPATH\u003e\n```\n\n**Prezto**\n\nMore reference: check **Migration from Prezto**\n\n```zsh\n# Load Prezto\nzgen prezto\nzi snippet PZTM::\u003cCOMMENT's List\u003e # environment terminal editor history directory spectrum utility completion prompt\n\n# Load prezto plugins\nzgen prezto \u003cmodulename\u003e\nzi snippet PZTM::\u003cmodulename\u003e\n\n# Load a repo as Prezto plugins\nzgen pmodule \u003creponame\u003e \u003cbranch\u003e\nzi ice ver\"\u003cbranch\u003e\"\nzi load \u003crepo/plugin\u003e\n\n# Set prezto options\nzgen prezto \u003cmodulename\u003e \u003coption\u003e \u003cvalue(s)\u003e\nzstyle ':prezto:\u003cmodulename\u003e:' \u003coption\u003e \u003cvalues(s)\u003e # Set original prezto style\n```\n\n**General**\n\n`location`: refer [Selection of Files](#selection-of-files-to-source-)\n\n```zsh\nzgen load \u003crepo\u003e [location] [branch]\n\nzi ice ver\"[branch]\"\nzi load \u003crepo\u003e\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e\u003cb\u003eMigration from Zplug\u003c/b\u003e\u003c/summary\u003e\n\n**Basic**\n\n```zsh\nzplug \u003crepo/plugin\u003e, tag1:\u003coption1\u003e, tag2:\u003coption2\u003e\n\nzi ice tag1\"\u003coption1\u003e\" tag2\"\u003coption2\u003e\"\nzi load \u003crepo/plugin\u003e\n```\n\n**Tag comparison**\n\n- `as` =\u003e `as`\n- `use` =\u003e `pick`, `src`, `multisrc`\n- `ignore` =\u003e None\n- `from` =\u003e `from`\n- `at` =\u003e `ver`\n- `rename-to` =\u003e `mv`, `cp`\n- `dir` =\u003e Selection(`pick`, ...) with rename\n- `if` =\u003e `if`\n- `hook-build` =\u003e `atclone`, `atpull`\n- `hook-load` =\u003e `atload`\n- `frozen` =\u003e None\n- `on` =\u003e None\n- `defer` =\u003e `wait`\n- `lazy` =\u003e `autoload`\n- `depth` =\u003e `depth`\n\n\u003c/details\u003e\n\n### More Examples\u003ca name=\"more-examples\"\u003e\u003c/a\u003e\n\nAfter installing **`Zinit 4`** you can start adding some actions (load some plugins) to `~/.zshrc`, at bottom. Some examples:\n\n```zsh\n# Load the pure theme, with zsh-async library that's bundled with it.\nzi ice pick\"async.zsh\" src\"pure.zsh\"\nzi light sindresorhus/pure\n\n# A glance at the new for-syntax – load all of the above\n# plugins with a single command. For more information see:\n# https://zdharma-continuum.github.io/zinit/wiki/For-Syntax/\nzinit for \\\n    light-mode \\\n  zsh-users/zsh-autosuggestions \\\n    light-mode \\\n  zdharma-continuum/fast-syntax-highlighting \\\n  zdharma-continuum/history-search-multi-word \\\n    light-mode \\\n    pick\"async.zsh\" \\\n    src\"pure.zsh\" \\\n  sindresorhus/pure\n\n# Binary release in archive, from GitHub-releases page.\n# After automatic unpacking it provides program \"fzf\".\nzi from\"gh-r\" as\"program\" for junegunn/fzf\n\n# One other binary release, it needs renaming from `docker-compose-Linux-x86_64`.\n# This is done by ice-mod `mv'{from} -\u003e {to}'. There are multiple packages per\n# single version, for OS X, Linux and Windows – so ice-mod `bpick' is used to\n# select Linux package – in this case this is actually not needed, Zinit will\n# grep operating system name and architecture automatically when there's no `bpick'.\nzi from\"gh-r\" \\\n    as\"program\" \\\n    mv\"docker* -\u003e docker-compose\" \\\n    bpick\"*linux*\" \\\n        for docker/compose\n\n# Vim repository on GitHub – a typical source code that needs compilation – Zinit\n# can manage it for you if you like, run `./configure` and other `make`, etc.\n# It'll install the package under the path $ZPFX, see:\n# https://zdharma-continuum.github.io/zinit/wiki/Compiling-programs\nzi build for vim/vim\n\n# Scripts built at install (there's single default make target, \"install\",\n# and it constructs scripts by `cat'ing a few files). The make'' ice could also be:\n# `make\"install\"`, if \"install\" wouldn't be the only default target.\nzi make for tj/git-extras\n\n# Handle completions without loading any plugin; see \"clist\" command.\n# This one is to be ran just once, in interactive session.\nzi creinstall %HOME/my_completions\n```\n\n```zsh\n# For GNU ls (the binaries can be gls, gdircolors, e.g. on OS X when installing the\n# coreutils package from Homebrew; you can also use https://github.com/ogham/exa)\nzi atclone\"dircolors -b LS_COLORS \u003e c.zsh\" \\\n    atpull'%atclone' \\\n    pick\"c.zsh\" \\\n    nocompile'!' \\\n        for trapd00r/LS_COLORS\n```\n\n[You can see an extended explanation of LS_COLORS in the Wiki.](https://zdharma-continuum.github.io/zinit/wiki/LS_COLORS-explanation/)\n\n```zsh\n# make'!...' -\u003e run make before atclone \u0026 atpull\nzi as\"program\" make'!' \\\n    atclone'./direnv hook zsh \u003e zhook.zsh' \\\n    atpull'%atclone' \\\n    src\"zhook.zsh\" \\\n        for direnv/direnv\n```\n\n[You can see an extended explanation of direnv in the Wiki.](https://zdharma-continuum.github.io/zinit/wiki/Direnv-explanation/)\n\nIf you're interested in more examples, then check out the\n[zinit-configs repository](https://github.com/zdharma-continuum/zinit-configs), where users have uploaded their\n`~/.zshrc` and **`Zinit 4`** configurations. Feel free to\n[submit](https://github.com/zdharma-continuum/zinit-configs/issues/new?template=request-to-add-zshrc-to-the-zinit-configs-repo.md)\nyour `~/.zshrc` there if it contains **`Zinit 4`** commands.\n\nYou can also check out the [Gallery of **`Zinit 4`** Invocations](https://zdharma-continuum.github.io/zinit/wiki/GALLERY/) for\nsome additional examples.\n\nAlso, two articles on the Wiki present an example setup\n[here](https://zdharma-continuum.github.io/zinit/wiki/Example-Minimal-Setup/) and\n[here](https://zdharma-continuum.github.io/zinit/wiki/Example-Oh-My-Zsh-setup/).\n\n# How to Use\u003ca name=\"how-to-use\"\u003e\u003c/a\u003e\n\n## Ice Modifiers\u003ca name=\"ice-modifiers\"\u003e\u003c/a\u003e\n\nFollowing `ice` modifiers are to be [passed](https://zdharma-continuum.github.io/zinit/wiki/Alternate-Ice-Syntax/) to\n`zinit ice ...` to obtain described effects. The word `ice` means something that's added (like ice to a drink) – and in\n**`Zinit 4`** it means adding modifier to a next `zinit` command, and also something that's temporary because it melts – and\nthis means that the modification will last only for a **single** next `zinit` command.\n\nSome Ice-modifiers are highlighted and clicking on them will take you to the appropriate Wiki page for an extended\nexplanation.\n\nYou may safely assume a given ice works with both plugins and snippets unless explicitly stated otherwise.\n\n### Cloning Options\u003ca name=\"cloning-options\"\u003e\u003c/a\u003e\n\n| Modifier    | Description                                                                                                                                                                                                                                                                                                                                  |\n| :---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `bpick`     | Used to select which release from GitHub Releases to download, e.g. `zini ice from\"gh-r\" as\"program\" bpick\"*Darwin*\"; zini load docker/compose`. **Does not work with snippets.**                                                                                                                                                            |\n| `cloneopts` | Pass the contents of `cloneopts` to `git clone`. Defaults to `--recursive`. I.e.: change cloning options. Pass empty ice to disable recursive cloning. **Does not work with snippets.**                                                                                                                                                      |\n| `depth`     | Pass `--depth` to `git`, i.e. limit how much of history to download. **Does not work with snippets.**                                                                                                                                                                                                                                        |\n| `from`      | Clone plugin from given site. Supported are `from\"github\"` (default), `...\"github-rel\"`, `...\"gitlab\"`, `...\"bitbucket\"`, `...\"notabug\"` (short names: `gh`, `gh-r`, `gl`, `bb`, `nb`). Can also be a full domain name (e.g. for GitHub enterprise). **Does not work with snippets.**                                                        |\n| `proto`     | Change protocol to `git`,`ftp`,`ftps`,`ssh`, `rsync`, etc. Default is `https`. **Does not work with snippets.**                                                                                                                                                                                                                              |\n| `pullopts`  | Pass the contents of `pullopts` to `git pull` used when updating plugins. **Does not work with snippets.**                                                                                                                                                                                                                                   |\n| `svn`       | Use Subversion for downloading snippet. GitHub supports `SVN` protocol, this allows to clone subdirectories as snippets, e.g. `zinit ice svn; zinit snippet OMZP::git`. Other ice `pick` can be used to select file to source (default are: `*.plugin.zsh`, `init.zsh`, `*.zsh-theme`). **Does not work with plugins.**                      |\n| `ver`       | Used with `from\"gh-r\"` (i.e. downloading a binary release, e.g. for use with `as\"program\"`) – selects which version to download. Default is latest, can also be explicitly `ver\"latest\"`. Works also with regular plugins and packages (`pack` ice) checkouts e.g. `ver\"abranch\"`, i.e. a specific version. **Does not work with snippets.** |\n\n### Selection of Files (To Source, …)\u003ca name=\"selection-of-files-to-source-%E2%80%A6\"\u003e\u003c/a\u003e\n\n| Modifier   | Description                                                                                                                                                                                                                                |\n| :--------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `multisrc` | Allows to specify multiple files for sourcing, enumerated with spaces as the separators (e.g. `multisrc'misc.zsh grep.zsh'`) and also using brace-expansion syntax (e.g. `multisrc'{misc,grep}.zsh'`). Supports patterns.                  |\n| `pick`     | Select the file to source, or the file to set as command (when using `snippet --command` or the ice `as\"program\"`); it is a pattern, alphabetically first matched file is being chosen; e.g. `zinit ice pick\"*.plugin.zsh\"; zinit load …`. |\n| `src`      | Specify additional file to source after sourcing main file or after setting up command (via `as\"program\"`). It is not a pattern but a plain file name.                                                                                     |\n\n### Conditional Loading\u003ca name=\"conditional-loading\"\u003e\u003c/a\u003e\n\n| Modifier                     | Description                                                                                                                                                                                                                                                                                                                                                              |\n| :--------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `cloneonly`                  | Don't load the plugin / snippet, only download it                                                                                                                                                                                                                                                                                                                        |\n| `has`                        | Load plugin or snippet only when given command is available (in $PATH), e.g. `zinit ice has'git' ...`                                                                                                                                                                                                                                                                    |\n| `if`                         | Load plugin or snippet only when given condition is fulfilled, for example: `zinit ice if'[[ -n \"$commands[otool]\" ]]'; zinit load ...`.                                                                                                                                                                                                                                 |\n| `load`                       | A condition to check which should cause plugin to load. It will load once, the condition can be still true, but will not trigger second load (unless plugin is unloaded earlier, see `unload` below). E.g.: `load'[[ $PWD = */github* ]]'`.                                                                                                                              |\n| `subscribe` / `on-update-of` | Postpone loading of a plugin or snippet until the given file(s) get updated, e.g. `subscribe'{~/files-*,/tmp/files-*}'`                                                                                                                                                                                                                                                  |\n| `trigger-load`               | Creates a function that loads the associated plugin/snippet, with an option (to use it, precede the ice content with `!`) to automatically forward the call afterwards, to a command of the same name as the function. Can obtain multiple functions to create – sparate with `;`.                                                                                       |\n| `unload`                     | A condition to check causing plugin to unload. It will unload once, then only if loaded again. E.g.: `unload'[[ $PWD != */github* ]]'`.                                                                                                                                                                                                                                  |\n| `wait`                       | Postpone loading a plugin or snippet. For `wait'1'`, loading is done `1` second after prompt. For `wait'[[ ... ]]'`, `wait'(( ... ))'`, loading is done when given condition is meet. For `wait'!...'`, prompt is reset after load. Zsh can start 80% (i.e.: 5x) faster thanks to postponed loading. **Fact:** when `wait` is used without value, it works as `wait'0'`. |\n\n### Plugin Output\u003ca name=\"plugin-output\"\u003e\u003c/a\u003e\n\n| Modifier | Description                                                                                                                                                                                                                                                                                                 |\n| :------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `lucid`  | Skip `Loaded ...` message under prompt for `wait`, etc. loaded plugins (a subset of `silent`).                                                                                                                                                                                                              |\n| `notify` | Output given message under-prompt after successfully loading a plugin/snippet. In case of problems with the loading, output a warning message and the return code. If starts with `!` it will then always output the given message. Hint: if the message is empty, then it will just notify about problems. |\n| `silent` | Mute plugin's or snippet's `stderr` \u0026 `stdout`. Also skip `Loaded ...` message under prompt for `wait`, etc. loaded plugins, and completion-installation messages.                                                                                                                                          |\n\n### Completions\u003ca name=\"completions\"\u003e\u003c/a\u003e\n\n| Modifier        | Description                                                                                                                                                                         |\n| :-------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `blockf`        | Disallow plugin to modify `fpath`. Useful when a plugin wants to provide completions in traditional way. **`Zinit 4`** can manage completions and plugin can be blocked from exposing them. |\n| `completions`   | Do detect, install and manage completions for this plugin. Overwrites `as'null'` or `nocompletions`.                                                                                |\n| `nocompletions` | Don't detect, install and manage completions for this plugin. Completions can be installed later with `zinit creinstall {plugin-spec}`.                                             |\n\n### Command Execution After Cloning, Updating or Loading\u003ca name=\"command-execution-after-cloning-updating-or-loading\"\u003e\u003c/a\u003e\n\n| Modifier     | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| :----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `atclone`    | Run command after cloning, within plugin's directory, e.g. `zinit ice atclone\"echo Cloned\"`. Ran also after downloading snippet.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |\n| `atinit`     | Run command after directory setup (cloning, checking it, etc.) of plugin/snippet but before loading.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `atload`     | Run command after loading, within plugin's directory. Can be also used with snippets. Passed code can be preceded with `!`, it will then be investigated (if using `load`, not `light`).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |\n| `atpull`     | Run command after updating (**only if new commits are waiting for download**), within plugin's directory. If starts with \"!\" then command will be ran before `mv` \u0026 `cp` ices and before `git pull` or `svn update`. Otherwise it is ran after them. Can be `atpull'%atclone'`, to repeat `atclone` Ice-mod.                                                                                                                                                                                                                                                                                                                                                              |\n| `configure`  | Runs `./configure` script and by default changes the installation directory by passing `--prefix=$ZPFX` to the script. Runs before `make''` and after `make'!'`, you can pass `'!'` too to this ice (i.e.: `configure'!'`) to make it execute earlier – before `make'!'` and after `make'!!'`. If `#` given in the ice value then also executes script `./autogen.sh` first before running `./configure`. The script is run anyway if there is no `configure` script. Also, when there exist another build-system related files, then it is run if no `configure` script is found. Currently supported systems are: CMake, scons and meson, checked-for/run in this order |\n| `build`  | Shorthand for `configure'--prefix=$ZPFX' make'install'`. Its argumens are passed to `make'…'`. |\n| `countdown`  | Causes an interruptable (by Ctrl-C) countdown 5…4…3…2…1…0 to be displayed before executing `atclone''`,`atpull''` and `make` ices                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n| `cp`         | Copy file after cloning or after update (then, only if new commits were downloaded). Example: `cp \"docker-c* -\u003e dcompose\"`. Ran after `mv`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| `make`       | Run `make` command after cloning/updating and executing `mv`, `cp`, `atpull`, `atclone` Ice mods. Can obtain argument, e.g. `make\"install PREFIX=/opt\"`. If the value starts with `!` then `make` is ran before `atclone`/`atpull`, e.g. `make'!'`.                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| `mv`         | Move file after cloning or after update (then, only if new commits were downloaded). Example: `mv \"fzf-* -\u003e fzf\"`. It uses `-\u003e` as separator for old and new file names. Works also with snippets.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n| `nocd`       | Don't switch the current directory into the plugin's directory when evaluating the above ice-mods `atinit''`,`atload''`, etc.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| `reset`      | Invokes `git reset --hard HEAD` for plugins or `svn revert` for SVN snippets before pulling any new changes. This way `git` or `svn` will not report conflicts if some changes were done in e.g.: `atclone''` ice. For file snippets and `gh-r` plugins it invokes `rm -rf *`.                                                                                                                                                                                                                                                                                                                                                                                            |\n| `run-atpull` | Always run the atpull hook (when updating), not only when there are new commits to be downloaded.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |\n\n### Sticky-Emulation Of Other Shells\u003ca name=\"sticky-emulation-of-other-shells\"\u003e\u003c/a\u003e\n\n| Modifier       | Description                                                                                                                                                                                                                                                                                                                                |\n| :------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |\n| `sh`/`!sh`     | Source the plugin's (or snippet's) script with `sh` emulation so that also all functions declared within the file will get a *sticky* emulation assigned – when invoked they'll execute also with the `sh` emulation set-up. The `!sh` version switches additional options that are rather not important from the portability perspective. |\n| `csh`/`!csh`   | The same as `sh`, but emulating `csh` shell.                                                                                                                                                                                                                                                                                               |\n| `ksh`/`!ksh`   | The same as `sh`, but emulating `ksh` shell.                                                                                                                                                                                                                                                                                               |\n| `bash`/`!bash` | The same as `sh`, but with the `SH_GLOB` option disabled, so that Bash regular expressions work.                                                                                                                                                                                                                                           |\n\n### Others\u003ca name=\"others\"\u003e\u003c/a\u003e\n\n| Modifier       | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |\n| :------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `as`           | Can be `as\"program\"` (also the alias: `as\"command\"`), and will cause to add script/program to `$PATH` instead of sourcing (see `pick`). Can also be `as\"completion\"` – use with plugins or snippets in whose only underscore-starting `_*` files you are interested in. The third possible value is `as\"null\"` – a shorthand for `pick\"/dev/null\" nocompletions` – i.e.: it disables the default script-file sourcing and also the installation of completions.                                                                                                                                                                                                   |\n| `link`         | Use a symlink to cache a local snippet instead of copying into the snippets directory.  Uses relative links if realpath \u003e= 8.23 is found.  ***Does not apply to URL-based snippets.  Does not work with plugins.***                                                                                                                                                                                                                                                                                                                                                                                                                                               |\n| `id-as`        | Nickname a plugin or snippet, to e.g. create a short handler for long-url snippet.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |\n| `subst`        | Substitute the given string into another string when sourcing the plugin script, e.g.: `zinit subst'autoload → autoload -Uz' …`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |\n| `aliases`      | Load the plugin with the aliases mechanism enabled. Use with plugins that define **and use** aliases in their scripts.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |\n| `autoload`     | Autoload the given functions (from their files). Equvalent to calling `atinit'autoload the-function'`. Supports renaming of the function – pass `'… → new-name'` or `'… -\u003e new-name'`, e.g.: `zinit autoload'fun → my-fun; fun2 → my-fun2'`.                                                                                                                                                                                                                                                                                                                                                                                                                      |\n| `bindmap`      | To hold `;`-separated strings like `Key(s)A -\u003e Key(s)B`, e.g. `^R -\u003e ^T; ^A -\u003e ^B`. In general, `bindmap''`changes bindings (done with the `bindkey` builtin) the plugin does. The example would cause the plugin to map Ctrl-T instead of Ctrl-R, and Ctrl-B instead of Ctrl-A. **Does not work with snippets.**                                                                                                                                                                                                                                                                                                                                                 |\n| `compile`      | Pattern (+ possible `{...}` expansion, like `{a/*,b*}`) to select additional files to compile, e.g. \\`compile\"(pure\\\\                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |\n| `extract`      | Performs archive extraction supporting multiple formats like `zip`, `tar.gz`, etc. and also notably OS X `dmg` images. If it has no value, then it works in the *auto* mode – it automatically extracts all files of known archive extensions IF they aren't located deeper than in a sub-directory (this is to prevent extraction of some helper archive files, typically located somewhere deeper in the tree). If no such files will be found, then it extracts all found files of known **type** – the type is being read by the `file` Unix command. If not empty, then takes names of the files to extract. Refer to the Wiki page for further information. |\n| `service`      | Make following plugin or snippet a *service*, which will be ran in background, and only in single Zshell instance. See [the zservice-\\* repositories](https://github.com/orgs/zdharma-continuum/repositories?q=zservice-).                                                                                                                                                                                                                                                                                                                                                                                                                                        |\n| `light-mode`   | Load the plugin without the investigating, i.e.: as if it would be loaded with the `light` command. Useful for the for-syntax, where there is no `load` nor `light` subcommand                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |\n| `nocompile`    | Don't try to compile `pick`-pointed files. If passed the exclamation mark (i.e. `nocompile'!'`), then do compile, but after `make''` and `atclone''` (useful if Makefile installs some scripts, to point `pick''` at the location of their installation).                                                                                                                                                                                                                                                                                                                                                                                                         |\n| `trackbinds`   | Shadow but only `bindkey` calls even with `zinit light ...`, i.e. even with investigating disabled (fast loading), to allow `bindmap` to remap the key-binds. The same effect has `zinit light -b ...`, i.e. additional `-b` option to the `light`-subcommand. **Does not work with snippets.**                                                                                                                                                                                                                                                                                                                                                                   |\n| `wrap-track`   | Takes a `;`-separated list of function names that are to be investigated (meaning gathering report and unload data) **once** during execution. It works by wrapping the functions with a investigating-enabling and disabling snippet of code. In summary, `wrap-track` allows to extend the investigating beyond the moment of loading of a plugin. Example use is to `wrap-track` a precmd function of a prompt (like `_p9k_precmd()` of powerlevel10k) or other plugin that _postpones its initialization till the first prompt_ (like e.g.: zsh-autosuggestions). **Does not work with snippets.**                                                            |\n| `reset-prompt` | Reset the prompt after loading the plugin/snippet (by issuing `zle .reset-prompt`). Note: normally it's sufficient to precede the value of `wait''` ice with `!`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |\n| `param`        | Creates parameters (variables) for the time of loading a plugin only. The variables are separated from their values via `-\u003e` or `→`, e.g.:`param'CMD_COMMAND_PATH → ~/cmds; CMD_DIR → $HOME'`. Multiple vars can be created either via separating them by `;` or via multiple `param''` ices. |\n\n### Order of Execution\u003ca name=\"order-of-execution\"\u003e\u003c/a\u003e\n\nOrder of execution of related Ice-mods: `atinit` -\u003e `atpull!` -\u003e `make'!!'` -\u003e `mv` -\u003e `cp` -\u003e `make!` -\u003e\n`atclone`/`atpull` -\u003e `make` -\u003e `(plugin script loading)` -\u003e `src` -\u003e `multisrc` -\u003e `atload`.\n\n## Zinit Commands\u003ca name=\"zinit-commands\"\u003e\u003c/a\u003e\n\nFollowing commands are passed to `zinit ...` to obtain described effects.\n\n### Help\u003ca name=\"help\"\u003e\u003c/a\u003e\n\n| Command   | Description           |\n| :-------- | --------------------- |\n| `help`    | Usage information.    |\n| `man`     | Manual.               |\n| `version` | Display **`Zinit 4`** version |\n\n### Loading and Unloading\u003ca name=\"loading-and-unloading\"\u003e\u003c/a\u003e\n\n| Command                  | Description                                                                                                                                                                                                                                                                                                          |\n| :----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `load {plg-spec}`        | Load plugin, can also receive absolute local path.                                                                                                                                                                                                                                                                   |\n| `snippet [-f] {url}`     | Source local or remote file (by direct URL). `-f` – don't use cache (force redownload). The URL can use the following shorthands: `PZT::` (Prezto), `PZTM::` (Prezto module), `OMZ::` (Oh My Zsh), `OMZP::` (OMZ plugin), `OMZL::` (OMZ library), `OMZT::` (OMZ theme), e.g.: `PZTM::environment`, `OMZP::git`, etc. |\n| `light [-b] {plg-spec}`  | Light plugin load, without reporting/investigating. `-b` – investigate `bindkey`-calls only. There's also `light-mode` ice which can be used to induce the no-investigating (i.e.: *light*) loading, regardless of the command used.                                                                                 |\n| `unload [-q] {plg-spec}` | Unload plugin loaded with `zinit load ...`. `-q` – quiet.                                                                                                                                                                                                                                                            |\n\n### Completions\u003ca name=\"completions-1\"\u003e\u003c/a\u003e\n\n| Command                                            | Description                                                                                                                                         |\n| -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `cclear`                                           | Clear stray and improper completions.                                                                                                               |\n| `cdclear [-q]`                                     | Clear compdef replay list. `-q` – quiet.                                                                                                            |\n| `cdisable {cname}`                                 | Disable completion `cname`.                                                                                                                         |\n| `cdlist`                                           | Show compdef replay list.                                                                                                                           |\n| `cdreplay [-q]`                                    | Replay compdefs (to be done after compinit). `-q` – quiet.                                                                                          |\n| `cenable {cname}`                                  | Enable completion `cname`.                                                                                                                          |\n| `clist \\[*columns*\\]`, `completions \\[*columns*\\]` | List completions in use, with \u003ccode\u003ecolumns\u003c/code\u003e completions per line. `zpl clist 5` will for example print 5 completions per line. Default is 3. |\n| `compinit`                                         | Refresh installed completions.                                                                                                                      |\n| `creinstall [-q] [-Q] {plg-spec}`                  | Install completions for plugin, can also receive absolute local path. `-q` – quiet. `-Q` - quiet all.                                               |\n| `csearch`                                          | Search for available completions from any plugin.                                                                                                   |\n| `cuninstall {plg-spec}`                            | Uninstall completions for plugin.                                                                                                                   |\n\n### Tracking of the Active Session\u003ca name=\"tracking-of-the-active-session\"\u003e\u003c/a\u003e\n\n| Command          | Description                                       |\n| ---------------- | ------------------------------------------------- |\n| `dclear`         | Clear report of what was going on in session.     |\n| `dstop`          | Stop investigating what's going on in session.    |\n| `dreport`        | Report what was going on in session.              |\n| `dunload`        | Revert changes recorded between dstart and dstop. |\n| `dtrace, dstart` | Start investigating what's going on in session.   |\n\n### Reports and Statistics\u003ca name=\"reports-and-statistics\"\u003e\u003c/a\u003e\n\n| Command                  | Description                                                                                                                                              |\n| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `bindkeys`               | Lists bindkeys set up by each plugin.                                                                                                                    |\n| `list-plugins [keyword]` | Show what plugins are loaded (filter with 'keyword').                                                                                                    |\n| `list-snippets`          | List snippets in formatted and colorized manner. Requires `tree` program.                                                                                |\n| `recently [time-spec]`   | Show plugins that changed recently, argument is e.g. 1 month 2 days.                                                                                     |\n| `report {plg-spec}`      | Show plugin report. `--all` – do it for all plugins.                                                                                                     |\n| `status {plg-spec}`      | Git status for plugin or svn status for snippet. `--all` – do it for all plugins and snippets.                                                           |\n| `zstatus`                | Display brief statistics for your **`Zinit 4`** installation.                                                                                                    |\n| `times [-a] [-m] [-s]`   | Print load times for each plugin. `-s` – Times are printed in seconds. `-m` – Show plugin loading moments. `-a` - Times and loading moments are printed. |\n\n### Compiling\u003ca name=\"compiling\"\u003e\u003c/a\u003e\n\n| Command                | Description                                                         |\n| ---------------------- | ------------------------------------------------------------------- |\n| `compiled`             | List plugins that are compiled.                                     |\n| `compile {plg-spec}`   | Compile plugin. `--all` – compile all plugins.                      |\n| `uncompile {plg-spec}` | Remove compiled version of plugin. `--all` – do it for all plugins. |\n\n### Other\u003ca name=\"other\"\u003e\u003c/a\u003e\n\n| Command                                                          | Description                                                                                                                                                                                                                                                                                                                           |\n| ---------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `module`                                                         | Manage binary Zsh module shipped with Zinit, see `zinit module help`.                                                                                                                                                                                                                                                                 |\n| `self-update`                                                    | Updates and compiles Zinit.                                                                                                                                                                                                                                                                                                           |\n| `cd {plg-spec}`                                                  | Cd into plugin's directory. Also support snippets if fed with URL.                                                                                                                                                                                                                                                                    |\n| `edit {plg-spec}`                                                | Edit plugin's file with $EDITOR.                                                                                                                                                                                                                                                                                                      |\n| `changes {plg-spec}`                                             | View plugin's git log.                                                                                                                                                                                                                                                                                                                |\n| `create {plg-spec}`                                              | Create plugin (also together with GitHub repository).                                                                                                                                                                                                                                                                                 |\n| `glance {plg-spec}`                                              | Look at plugin's source (pygmentize, {,source-}highlight).                                                                                                                                                                                                                                                                            |\n| `stress {plg-spec}`                                              | Test plugin for compatibility with set of options.                                                                                                                                                                                                                                                                                    |\n| `recall {plg-spec}\\|URL`                                         | Fetch saved ice modifiers and construct `zinit ice ...` command.                                                                                                                                                                                                                                                                      |\n| `srv {service-id} [cmd]`                                         | Control a service, command can be: stop,start,restart,next,quit; `next` moves the service to another Zshell.                                                                                                                                                                                                                          |\n| `ice \u003cice specification\u003e`                                        | Add ice to next command, argument is e.g. from\"gitlab\".                                                                                                                                                                                                                                                                               |\n| `env-whitelist [-v] [-h] {env..}`                                | Allows to specify names (also patterns) of variables left unchanged during an unload. `-v` – verbose.                                                                                                                                                                                                                                 |\n| `run` `[-l]` `[plugin]` `{command}`                              | Runs the given command in the given plugin's directory. If the option `-l` will be given then the plugin should be skipped – the option will cause the previous plugin to be reused.                                                                                                                                                  |\n| `delete {plg-spec}\\|URL\\|--clean\\|--all`                         | Remove plugin or snippet from disk (good to forget wrongly passed ice-mods).  \u003cbr\u003e `--all` – purge.\u003cbr\u003e `--clean` – delete plugins and snippets that are not loaded.                                                                                                                                                                  |\n| `update [-q] [-r] {plg-spec}\\|URL\\|--all`                        | Git update plugin or snippet.\u003cbr\u003e `--all` – update all plugins and snippets.\u003cbr\u003e  `-q` – quiet.\u003cbr\u003e `-r` \\| `--reset` – run `git reset --hard` / `svn revert` before pulling changes.                                                                                                                                                 |\n| `add-fpath\\|fpath` `[-f\\|--front]` `{plg-spec}` `[subdirectory]` | Adds given plugin (not yet snippet) directory to `$fpath`. If the second argument is given, it is appended to the directory path. If the option `-f`/`--front` is given, the directory path is prepended instead of appended to `$fpath`. The `{plg-spec}` can be absolute path, i.e.: it's possible to also add regular directories. |\n\n## Updating Zinit and Plugins\u003ca name=\"updating-zinit-and-plugins\"\u003e\u003c/a\u003e\n\nTo update **`Zinit 4`** issue `zinit self-update` in the command line.\n\nTo update all plugins and snippets, issue `zinit update`. If you wish to update only a single plugin/snippet instead\nissue `zinit update NAME_OF_PLUGIN`. A list of commits will be shown:\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./doc/img/update.png\" /\u003e\n\u003c/p\u003e\n\nSome plugins require performing an action each time they're updated. One way you can do this is by using the `atpull`\nice modifier. For example, writing `zinit ice atpull'./configure'` before loading a plugin will execute `./configure`\nafter a successful update. Refer to [Ice Modifiers](#ice-modifiers) for more information.\n\nThe ice modifiers for any plugin or snippet are stored in their directory in a `._zinit` subdirectory, hence the plugin\ndoesn't have to be loaded to be correctly updated. There's one other file created there, `.zinit_lstupd` – it holds the\nlog of the new commits pulled-in in the last update.\n\n## Completions\u003ca name=\"completions-2\"\u003e\u003c/a\u003e\n\n### Calling `compinit` Without Turbo Mode\u003ca name=\"calling-compinit-without-turbo-mode\"\u003e\u003c/a\u003e\n\nWith no Turbo mode in use, compinit can be called normally, i.e.: as `autoload compinit; compinit`. This should be done\nafter loading of all plugins and before possibly calling `zinit cdreplay`.\n\nThe `cdreplay` subcommand is provided to re-play all catched `compdef` calls. The `compdef` calls are used to define a\ncompletion for a command. For example, `compdef _git git` defines that the `git` command should be completed by a `_git`\nfunction.\n\nThe `compdef` function is provided by `compinit` call. As it should be called later, after loading all of the plugins,\n**`Zinit 4`** provides its own `compdef` function that catches (i.e.: records in an array) the arguments of the call, so that\nthe loaded plugins can freely call `compdef`. Then, the `cdreplay` (*compdef-replay*) can be used, after `compinit` will\nbe called (and the original `compdef` function will become available), to execute all detected `compdef` calls. To\nsummarize:\n\n```zsh\nZINIT_HOME=\"${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git\"\nsource \"${ZINIT_HOME}/zinit.zsh\"\n\nzinit load \"some/plugin\"\n...\ncompdef _gnu_generic fd  # this will be intercepted by Zinit, because as the compinit\n                         # isn't yet loaded, thus there's no such function `compdef'; yet\n                         # Zinit provides its own `compdef' function which saves the\n                         # completion-definition for later possible re-run with `zinit\n                         # cdreplay' or `zicdreplay' (the second one can be used in hooks\n                         # like atload'', atinit'', etc.)\n...\nzinit load \"other/plugin\"\n\nautoload -Uz compinit\ncompinit\n\n# -q is for quiet; actually run all the `compdef's saved before `compinit` call\n# (`compinit' declares the `compdef' function, so it cannot be used until\n# `compinit' is ran; Zinit solves this via intercepting the `compdef'-calls and\n# storing them for later use with `zinit cdreplay')\n\nzinit cdreplay -q\n```\n\nThis allows to call compinit once. Performance gains are huge, example shell startup time with double `compinit`:\n**0.980** sec, with `cdreplay` and single `compinit`: **0.156** sec.\n\n### Calling `compinit` With Turbo Mode\u003ca name=\"calling-compinit-with-turbo-mode\"\u003e\u003c/a\u003e\n\nIf you load completions using `wait''` Turbo mode then you can add `atinit'zicompinit'` to syntax-highlighting plugin\n(which should be the last one loaded, as their (2 projects,\n[z-sy-h](https://github.com/zsh-users/zsh-syntax-highlighting) \u0026\n[f-sy-h](https://github.com/zdharma-continuum/fast-syntax-highlighting)) documentation state), or `atload'zicompinit'`\nto last completion-related plugin. `zicompinit` is a function that just runs `autoload compinit; compinit`, created for\nconvenience. There's also `zicdreplay` which will replay any caught compdefs so you can also do:\n`atinit'zicompinit; zicdreplay'`, etc. Basically, the whole topic is the same as normal `compinit` call, but it is done\nin `atinit` or `atload` hook of the last related plugin with use of the helper functions (`zicompinit`,`zicdreplay` \u0026\n`zicdclear` – see below for explanation of the last one). To summarize:\n\n```zsh\nZINIT_HOME=\"${XDG_DATA_HOME:-${HOME}/.local/share/zinit}\"\nsource \"${ZINIT_HOME}/zinit.zsh\"\n\n# Load using the for-syntax\nzinit lucid wait for \\\n  \"some/plugin\"\n\nzinit lucid wait for \\\n  \"other/plugin\"\n\nzi for \\\n    atload\"zicompinit; zicdreplay\" \\\n    blockf \\\n    lucid \\\n    wait \\\n  zsh-users/zsh-completions\n```\n\n### Ignoring Compdefs\u003ca name=\"ignoring-compdefs\"\u003e\u003c/a\u003e\n\nIf you want to ignore compdefs provided by some plugins or snippets, place their load commands before commands loading\nother plugins or snippets, and issue `zinit cdclear` (or `zicdclear`, designed to be used in hooks like `atload''`):\n\n```zsh\nZINIT_HOME=\"${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git\"\nsource \"${ZINIT_HOME}/zinit.zsh\"\n\nzi snippet OMZP::git\nzi cdclear -q # \u003c- forget completions provided by Git plugin\n\nzi load \"some/plugin\"\n...\nzi load \"other/plugin\"\n\nautoload -Uz compinit\ncompinit\nzi cdreplay -q # \u003c- execute compdefs provided by rest of plugins\nzi cdlist # look at gathered compdefs\n```\n\nThe `cdreplay` is important if you use plugins like `OMZP::kubectl` or `asdf-vm/asdf`, because these plugins call\n`compdef`.\n\n### Disabling System-Wide `compinit` Call (Ubuntu)\u003ca name=\"disabling-system-wide-compinit-call-ubuntu\"\u003e\u003c/a\u003e\n\nOn Ubuntu users might get surprised that e.g. their completions work while they didn't call `compinit` in their\n`.zshrc`. That's because the function is being called in `/etc/zshrc`. To disable this call – what is needed to avoid\nthe slowdown and if user loads any completion-equipped plugins, i.e. almost on 100% – add the following lines to\n`~/.zshenv`:\n\n```zsh\n# Skip the not really helping Ubuntu global compinit\nskip_global_compinit=1\n```\n\n## **`Zinit 4`** Module\u003ca name=\"zinit-module\"\u003e\u003c/a\u003e\n\nThe module is now hosted [in its own repository](https://github.com/zdharma-continuum/zinit-module)\n\n## Hints and Tips\u003ca name=\"hints-and-tips\"\u003e\u003c/a\u003e\n\n### Using ZPFX variable\n\n**`Zinit 4`** uses a special, short named variable `$ZPFX` to denote a standard \"prefix\" for installing compiled software. Such, commonly used, prefixes are usually, e.g.: `/usr/`,`/usr/local` or `$HOME/.local`. Basically, when one would want to explain what a prefix-dir is in one sentence, it would be something like: a root directory, under which `…/bin`,`…/share`, `…/lib` sub-dirs are populated with installed binaries, data-files, libraries, etc.\n\nHow to use the variable? It is automatically exploited when using `configure''` and `make''` ices, and user doesn't have to take any actions. This means that the `configure` command that'll be run will be:\n\n```zsh\n./configure --prefix=$ZPFX\n```\n\nThe default location used for `$ZPFX` is: `~/.local/share/zinit/polaris`. You can, for example, set it to `$HOME/.local` to have the software installed with `configure''` and `make''` ices installed to that directory.\n\nTypical use cases when working with `$ZPFX` are, e.g.:\n\n```zsh\n$ ls $ZPFX\n$ cd $ZPFX\n$ cd $ZPFX/bin  # note: $ZPFX/bin is automatically prepended to $PATH\n$ cd $ZPFX/share\n```\n\nBefore the `configure''` ice appeared one would use `$ZPFX` as follows:\n\n```zsh\nzinit atclone'./configure --prefix=$ZPFX` atpull'%atclone' make \\\n        for universal-ctags/ctags\n```\n\nbut now it's sufficient to do:\n\n```zsh\n# Will work for any build system\n# (supported are: configure, cmake, scons and meson)\nzinit configure make for universal-ctags/ctags\n```\n\nTo set ZPFX, one should do (in `.zshrc` before loading `zinit`):\n\n```zsh\n$ export ZPFX=$HOME/my-software # or: ZPFX=$HOME/.local, etc.\n```\n\nWe encourage people to install compiled software with use of `$ZPFX` and `configure''` and `make''` ices, to have a nice, clean user-home dir based setup.\n\n### Customizing Paths\u003ca name=\"customizing-paths\"\u003e\u003c/a\u003e\n\nFollowing variables can be set to custom values, before sourcing Zinit. The previous global variables like `$ZPLG_HOME`\nhave been removed to not pollute the namespace – there's single `$ZINIT` hash instead of `8` string variables. Please\nupdate your dotfiles.\n\n```zsh\ndeclare -A ZINIT  # initial Zinit's hash definition, if configuring before loading Zinit, and then:\n```\n\n| Hash Field                          | Description                                                                                                                                                                                                                                                                                                                                                                                              |\n| ----------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| ZINIT\\[BIN_DIR\\]                    | Where **`Zinit 4`** code resides, e.g.: \"~/.local/share/zinit/zinit.git\"                                                                                                                                                                                                                                                                                                                                         |\n| ZINIT\\[HOME_DIR\\]                   | Where **`Zinit 4`** should create all working directories, e.g.: \"~/.local/share/zinit\"                                                                                                                                                                                                                                                                                                                          |\n| ZINIT\\[MAN_DIR\\]                    | Directory where plugins can store their manpages (`atclone\"cp -vf myplugin.1 $ZINIT[MAN_DIR]/man1\"`). If overridden, this directory will not necessarily be used by `man` (See #8). Default: `$ZPFX/man`                                                                                                                                                                                                 |\n| ZINIT\\[PLUGINS_DIR\\]                | Override single working directory – for plugins, e.g. \"/opt/zsh/zinit/plugins\"                                                                                                                                                                                                                                                                                                                           |\n| ZINIT\\[COMPLETIONS_DIR\\]            | As above, but for completion files, e.g. \"/opt/zsh/zinit/root_completions\"                                                                                                                                                                                                                                                                                                                               |\n| ZINIT\\[SNIPPETS_DIR\\]               | As above, but for snippets                                                                                                                                                                                                                                                                                                                                                                               |\n| ZINIT\\[LIST_COMMAND\\]               | Command to use for displaying a directory tree (e.g., `ls --tree`, `tree`, etc.)                                                                                                                                                                                                                                                                                                                         |\n| ZINIT\\[ZCOMPDUMP_PATH\\]             | Path to `.zcompdump` file, with the file included (i.e. its name can be different)                                                                                                                                                                                                                                                                                                                       |\n| ZINIT\\[COMPINIT_OPTS\\]              | Options for `compinit` call (i.e. done by `zicompinit`), use to pass -C to speed up loading                                                                                                                                                                                                                                                                                                              |\n| ZINIT\\[MUTE_WARNINGS\\]              | If set to `1`, then mutes some of the **`Zinit 4`** warnings, specifically the `plugin already registered` warning                                                                                                                                                                                                                                                                                               |\n| ZINIT\\[OPTIMIZE_OUT_DISK_ACCESSES\\] | If set to `1`, then **`Zinit 4`** will skip checking if a Turbo-loaded object exists on the disk. By default **`Zinit 4`** skips Turbo for non-existing objects (plugins or snippets) to install them before the first prompt – without any delays, during the normal processing of `zshrc`. This option can give a performance gain of about 10 ms out of 150 ms (i.e.: Zsh will start up in 140 ms instead of 150 ms). |\n| ZINIT\\[NO_ALIASES\\]                 | If set to `1`, then **`Zinit 4`** will not set aliases such as `zi` or `zini`                                                                                                                                                                                                                                                                                                                                    |\n\nThere is also `$ZPFX`, set by default to `~/.local/share/zinit/polaris` – a directory where software with `Makefile`,\netc. can be pointed to, by e.g. `atclone'./configure --prefix=$ZPFX'`.\n\n### Non-GitHub (Local) Plugins\u003ca name=\"non-github-local-plugins\"\u003e\u003c/a\u003e\n\nUse `create` subcommand with user name `_local` (the default) to create plugin's skeleton in `$ZINIT[PLUGINS_DIR]`. It\nwill be not connected with GitHub repository (because of user name being `_local`). To enter the plugin's directory use\n`cd` command with just plugin's name (without `_local`, it's optional).\n\nIf user name will not be `_local`, then **`Zinit 4`** will create repository also on GitHub and setup correct repository origin.\n\n### Extending Git\u003ca name=\"extending-git\"\u003e\u003c/a\u003e\n\nThere are several projects that provide git extensions. Installing them with **`Zinit 4`** has many benefits:\n\n- all files are under `$HOME` – no administrator rights needed,\n- declarative setup (like Chef or Puppet) – copying `.zshrc` to different account brings also git-related setup,\n- easy update by e.g. `zinit update --all`.\n\nBelow is a configuration that adds multiple git extensions, loaded in Turbo mode, 1 second after prompt, with use of the\n[Bin-Gem-Node](https://github.com/zdharma-continuum/zinit-annex-bin-gem-node) annex:\n\n```zsh\nzi as'null' lucid sbin wait'1' for \\\n  Fakerr/git-recall \\\n  davidosomething/git-my \\\n  iwata/git-now \\\n  paulirish/git-open \\\n  paulirish/git-recent \\\n    atload'export _MENU_THEME=legacy' \\\n  arzzen/git-quick-stats \\\n    make'install' \\\n  tj/git-extras \\\n    make'GITURL_NO_CGITURL=1' \\\n    sbin'git-url;git-guclone' \\\n  zdharma-continuum/git-url\n```\n\nTarget directory for installed files is `$ZPFX` (`~/.local/share/zinit/polaris` by default).\n\n### Use named directories for plugin dirs\n\nNamed directories are shorthands in the form of `~NAMED_DIR`\n(upper case not required). They are setup via `hash` command\nwith `-d` option, and point to a directory, for example:\n\n```zsh\n# Set up a GHUB named directory\nhash -d GHUB=~/github\n# Then use as:\ncd ~GHUB/my-project\n# PWD is now: ~/github/my-project\n```\n\nA nice usecase for it can be labelling all plugin directories\nwith `~plugin-id` (for `user-id/plugin-id` plugin), via\nfollowing snippet added to the end of zshrc:\n\n```zsh\nfor i in $ZINIT[PLUGINS_DIR]/*; do\n    # Remove all except the final ID component.\n    q=${${i:t}##*---}\n    # Remove trailing slash.\n    q=${q%/}\n    # Hash the final ID part with directory.\n    # After this it's possible to `cd ~fzf`\n    # to get to directory of `junegunn/fzf`.\n    hash -d $q=$i\ndone\n```\n## Changelog\u003ca name=\"changelog\"\u003e\u003c/a\u003e\n\nLink to the [CHANGELOG](doc/CHANGELOG.md).\n## Completion for Plugin IDs and Ices\n\n**`Zinit 4`** supports a custom completion for plugin IDs (`Alt-Shift-A`) and\nfor ices (`Alt-Shift-C`). Just place the cursor after e.g.: `wa` and\npress `Alt-Shift-C` to have it completed to `wait`. The same with\nplugin IDs – `fzf` then `Alt-Shift-A` to have `junegunn/fzf` (if it's\ninstalled).\n\n## Support\u003ca name=\"support\"\u003e\u003c/a\u003e\n\n**`Zinit 4`** is a personal, free-time project with no funding and a huge\n[feature request backlog](https://github.com/zdharma-continuum/zinit/issues). If you love it, consider supporting its\ndevelopment via GitHub Sponsors \\[pending\\]. Any help counts!\n\n## Getting Help and Community\u003ca name=\"getting-help-and-community\"\u003e\u003c/a\u003e\n\nDo you need help or wish to get in touch with other **`Zinit 4`** users?\n\n- [Open a discussion](https://github.com/zdharma-continuum/zinit/discussions).\n\n- Or via reach out via Gitter\n  [![Join the chat at https://gitter.im/zdharma-continuum/community][gitter-badge]][gitter-link]\n\n[gitter-badge]: https://badges.gitter.im/zdharma-continuum/zinit.svg\n[gitter-link]: https://gitter.im/zdharma-continuum/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n[mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[mit-link]: ./LICENSE\n[tests-badge]: https://github.com/zdharma-continuum/zinit/actions/workflows/tests.yaml/badge.svg\n[tests-link]: https://github.com/zdharma-continuum/zinit/actions/workflows/tests.yaml\n[ver-badge]: https://img.shields.io/github/tag/zdharma-continuum/zinit.svg\n[ver-link]: https://github.com/zdharma-continuum/zinit/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsprint%2FZinit-4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsprint%2FZinit-4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsprint%2FZinit-4/lists"}