Skip to content

Latest commit

 

History

519 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

❮ Zi ❯ Logo Src

✨ Z-Shell source library — snippets, installer scripts and shared utilities


Content

Loader configuration

public/zsh/init.zsh defines zzinit(). Sourcing the file only declares the function and applies defaults; nothing is cloned, sourced, or written until zzinit is called.

The loader owns only the settings that must exist before Zi does:

Setting Default Purpose
ZI[REPOSITORY] https://github.com/z-shell/zi.git Clone source
ZI[STREAM] main Branch or tag to clone
ZI[HOME_DIR] Legacy home, otherwise XDG data zi root Working-directory root
ZI[BIN_DIR] ${ZI[HOME_DIR]}/bin Where zi.zsh is cloned
ZI[MUTE_WARNINGS] 0 Loader warning control

The loader mirrors Zi core's home-resolution contract because it must find or clone zi.zsh before core can run. An explicit ZI[HOME_DIR] wins. A recognized legacy $HOME/.zi installation stays active. Otherwise the loader uses ${XDG_DATA_HOME}/zi when XDG_DATA_HOME is absolute, or $HOME/.local/share/zi when it is unset, empty, or relative. When both homes contain Zi data, an explicit or unique existing BIN_DIR identity selects the matching home; otherwise the conservative fallback is the legacy home. No automatic move or merge occurs.

ZI[CACHE_DIR], ZI[CONFIG_DIR], and every other Zi path are owned and derived by zi.zsh. Set one in .zshrc before sourcing the loader to override it; do not add a duplicate default to the loader. See the customization guide.

One loader-only toggle exists:

Setting Default Purpose
ZI[LOADER_HISTORY] 1 Set to 0 to leave HISTFILE/SAVEHIST/HISTSIZE alone

Maintainer — Verify and Sync Loader

Check whether the local public/zsh/init.zsh matches the canonical GitHub raw main copy:

sh public/sh/sync-init.sh

Replace the local file if it drifts:

sh public/sh/sync-init.sh --write

Run against local fixtures (no network required, useful in tests):

sh public/sh/sync-init.sh \
  --local  /tmp/my-init.zsh \
  --remote /tmp/remote-init.zsh \
  --checksum-url /tmp/checksum.txt

Skip checksum validation:

sh public/sh/sync-init.sh --no-checksum

This repository is compatible with Zi

About

✨ Z-Shell source library — snippets, installer scripts and shared utilities

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

10 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages