โก๏ธ Installation
Automated setupโ
- Verify the sha256 checksum for file: lib/sh/install.sh
- If required append -b <tag> or -b <branch> e.g:
sh -c "$(curl -fsSL get.zshell.dev)" -- -i skip -b main
- Minimal
- Loader
- Repository
- Annex
- ZUnit
Install and include minimal configuration to the .zshrc:
sh -c "$(curl -fsSL get.zshell.dev)" --
Install and include minimal configuration with loader:
sh -c "$(curl -fsSL get.zshell.dev)" -- -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" && zzinit
fi
Then reload the shell with: exec zsh. All done!
Clone repository using default or if set custom values:
sh -c "$(curl -fsSL get.zshell.dev)" -- -i skip
Install and include minimal configuration with recommended annexes:
sh -c "$(curl -fsSL get.zshell.dev)" -- -a annex
Install and include minimal configuration with recommended annexes and setup zdharma/zunit:
sh -c "$(curl -fsSL get.zshell.dev)" -- -a zunit
Manual Setupโ
Prepareโ
Set up the install location and create a directory:
typeset -Ag ZI
typeset -gx ZI[HOME_DIR]="${HOME}/.zi"
typeset -gx ZI[BIN_DIR]="${HOME}/.zi/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]"
Enableโ
To enable Zi, source the zi.zsh from the previously set up directory placing the following snippet in the .zshrc file:
typeset -A ZI
ZI[BIN_DIR]="${HOME}/.zi/bin"
source "${ZI[BIN_DIR]}/zi.zsh"
Completionsโ
Enable Zi completions by placing the following snippet in the .zshrc file:
The snippet below must be placed after after enabling Zi.
autoload -Uz _zi
(( ${+_comps} )) && _comps[zi]=_zi
Post-installโ
After a fresh install, it is recommended to reload the shell and recompile Zi with:
- exec zsh -il
- zi self-update
Run zi -h for available commands or explore wiki to extend, customize and create ๐ ๐.
If you have any issue or need help ๐คฆโโ๏ธ, lets discuss it or open an issue on GitHub.
It helps us to improve and make Zi better. Don't forget to help the project: share, contribute, or translate ๐ ๐ฅฐ ๐ค.
Let's glue a toolchain that works for us ๐.
Have ideas?โ
ย Suggest or request atย playgroundโ
sh -c "$(curl -fsSL get.zshell.dev)" -- -a ???
ย Need warm-up?โ
ย Docker Alpineโ
docker run --rm -it ghcr.io/z-shell/zd:latest
Turbo Zi in Dockerโ
If you create a Docker image that uses Zi, install Turbo-loaded plugins before the shell starts interactively, with the @zi-scheduler function in such a way, that it:
- Install plugins without waiting for the prompt (i.e. it's script friendly).
- Install all plugins instantly, without respecting the wait argument.
To accomplish this, use burst argument and call the @zi-scheduler function:
RUN zsh -i -c -- '@zi-scheduler burst || true'
- An example: Dockerfile
- In action: Playground
Zi Module: zpmodโ
The module transparently and automatically compiles sourced scripts and lists of all sourced files with the time the sourcing took in milliseconds on the left.
Available linksโ
Status page โ
Installerโ
| Service | URL |
|---|---|
| Git.io | https://git.io/get-zi |
| GitHub RAW | https://raw.githubusercontent.com/z-shell/zi-src/main/lib/sh/install.sh |
Loaderโ
| Service | URL |
|---|---|
| Git.io | https://git.io/zi-loader |
| GitHub RAW | https://raw.githubusercontent.com/z-shell/zi-src/main/lib/zsh/init.zsh |