Show & Tell: zinit setup for Termux on Android
Summary
Section titled “Summary”Zinit works on Termux. FZF key-bindings and completions are loaded as local snippets from $PREFIX/share/fzf/ (where Termux’s fzf package installs them), not from GitHub.
Details
Section titled “Details”Termux-specific notes:
$PREFIXis/data/data/com.termux/files/usr— package-managed files live thereis-snippetice is used to load local files as zinit snippets- FZF ships its shell scripts in
$PREFIX/share/fzf/ zpcompinitandzpcdreplayare aliases forzicompinitandzicdreplay(both forms work)ZINIT[COMPINIT_OPTS]=-Cskips the insecure-directory check on compinit (speeds up startup)
Examples
Section titled “Examples”# OMZ libs (non-turbo, needed before first prompt)zinit lucid light-mode for \ OMZL::history.zsh \ OMZL::completion.zsh \ OMZL::key-bindings.zsh
# Completions + UX plugins in turbozinit wait lucid light-mode for \ atinit"ZINIT[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \ zdharma-continuum/fast-syntax-highlighting \ OMZP::colored-man-pages \ OMZP::git \ atload"!_zsh_autosuggest_start" \ zsh-users/zsh-autosuggestions \ blockf atpull'zinit creinstall -q .' \ zsh-users/zsh-completions
# FZF from Termux package (not GitHub)zinit wait lucid is-snippet for \ $PREFIX/share/fzf/key-bindings.zsh \ $PREFIX/share/fzf/completion.zsh
export FZF_DEFAULT_OPTS='--color 16'Caveats
Section titled “Caveats”ZINIT[COMPINIT_OPTS]=-C passes -C to compinit, which skips the security check for completion files. This is needed on Termux because the prefix path is world-writable. Do not use -C on standard Linux/macOS systems where the security check is meaningful.