⚡️ Installation
Installation Rapide
Add the following snippet in the .zshrc file:
- Instant
- Verified
source <(curl -sL git.io/zi-loader); zzinit
Verify the sha256 checksum for a file: lib/zsh/init.zsh:
local cs_ok='7fab1ecb8d2ffbdb4aa98dd1e51cebaeaa4d8137e1de11938f3e0df24af262bb'local cs=$(sha256sum <(curl -sL git.io/zi-loader) | awk '{print $1}')[[ $cs_ok == $cs ]] && { source <(curl -sL git.io/zi-loader); zzinit; } || { print -P "%F{160}▓▒░ Houston, we have a problem, the %F{226}$cs%F{160} do not match\!%f%b"; exit 1}Rechargez le shell avec exec zsh et exécutez zi -h pour obtenir des informations sur l'utilisation.
Automated setup
- Verify the sha256 checksum for file:
lib/sh/install.sh - Si nécessaire, ajoutez
-b <tag>ou-b <branch>, par exemple:
sh -c "$(curl -fsSL git.io/get-zi)" -- -i skip -b main
- Minimal
- Loader
- Repository
- Annex
- ZUnit
Install and include minimal configuration to the .zshrc:
sh -c "$(curl -fsSL git.io/get-zi)" --
Install and include minimal configuration with loader:
sh -c "$(curl -fsSL git.io/get-zi)" -- -a loader
The installer will download the loader and add the snippet below to the .zshrc file.
if [[ -r "${XDG_CONFIG_HOME:-${HOME}/.config}/zi/init.zsh" ]]; then source "${XDG_CONFIG_HOME:-${HOME}/.config}/zi/init.zsh" && zzinitfiThe loader can be manually fetched from available links to any location on the system, and sourced from .zshrc or as shown in the quick-setup.
Then reload shell with: exec zsh. All done!
Clone repository using default or if set custom values:
sh -c "$(curl -fsSL git.io/get-zi)" -- -i skip
Install and include minimal configuration with recommended annexes:
sh -c "$(curl -fsSL git.io/get-zi)" -- -a annex
Install and include minimal configuration with recommended annexes and setup zdharma/zunit:
sh -c "$(curl -fsSL git.io/get-zi)" -- -a zunit
Manual Setup
Set up install location and create a directory:
typeset -Ag ZIexport ZI[HOME_DIR]="${HOME}/.zi"export ZI[BIN_DIR]="${ZI[HOME_DIR]}/bin"command mkdir -p "$ZI[BIN_DIR]"For security reasons run function compaudit to check if the completion system would use files owned by root or by the current user, or files in directories that are world or group-writable.
If failed, then set the current user as the owner of directories, then remove group/others write permissions, and clone the repository:
compaudit | xargs chown -R "$(whoami)" "$ZI[HOME_DIR]"compaudit | xargs chmod -R go-w "$ZI[HOME_DIR]"command git clone https://github.com/z-shell/zi.git "$ZI[BIN_DIR]"To enable Zi, source the zi.zsh from the previously set up directory placing the following snippet in the .zshrc file:
typeset -A ZIZI[BIN_DIR]="${HOME}/.zi/bin"source "${ZI[BIN_DIR]}/zi.zsh"The two lines below must be placed after the lines above, i.e. after enabling Zi.
Enable Zi completions:
autoload -Uz _zi(( ${+_comps} )) && _comps[zi]=_ziPost-install
Après une nouvelle installation, il est recommandé de recharger le shell avec exec zsh et de compiler Zi avec zi self-update. Run zi -h to see all available commands. Augmentez les fonctionnalités et les performances de Zi ou commencez par explorer le wiki.
If you have any issue or need help 🤦♂️, lets discuss it or open an issue in any language.
Cela nous aide à améliorer et à améliorer Zi. Don't forget to help the project: share, contribute, or translate 🌐 🥰 🤓.
Let's glue everything together to create a toolchain that works for us 🚀.
Have ideas?
Suggest or request at playground
sh -c "$(curl -fsSL git.io/get-zi)" -- -a ???
Need warm-up?
Docker Alpine
docker run --rm -it ghcr.io/z-shell/zd:latest
Turbo Zi dans Docker
Si vous créez une image Docker qui utilise Zi, installez les plug-ins chargés par Turbo avant que le shell ne démarre de manière interactive, avec la fonction @zi-scheduler de telle manière qu'elle:
- Install plugins without waiting for the prompt (i.e. it's script friendly).
- Install all plugins instantly, without respecting the
waitargument.
Pour ce faire, utilisez l'argument burst et appelez la fonction @zi-scheduler:
RUN zsh -i -c -- '@zi-scheduler burst || true'
- An example: Dockerfile
- In action: Playground
Zi Module: zpmod
- Required Zsh version: >= v5.8.0
- z-shell/zpmod
- With Zi
- Standalone
Usage:
zi module {build|info|help} [options]zi module build [--clean]zi module info [--link]- To start using the Zi Zsh module run:
zi module build. Append--cleanto runmake distclean. - To display the instructions on loading the module, run:
zi module info. - To enable debug messages from the module set:
typeset -g ZI_MOD_DEBUG=1
sh -c "$(curl -fsSL git.io/get-zi)" -- -a zpmod
Available links
Installer
| Service | URL |
|---|---|
| Redirect | https://get.zshell.dev |
| IPFS | https://ipfs.zshell.dev/sh/install.sh |
| Direct | https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh |
Loader
| Service | URL |
|---|---|
| Redirect | https://init.zshell.dev |
| IPFS | https://ipfs.zshell.dev/zsh/init.zsh |
| Direct | https://raw.githubusercontent.com/z-shell/zi-src/main/lib/zsh/init.zsh |