Skip to content

Cannot get zi completion to work #209

Answered by ss-o
Kritiqual asked this question in Q&A
Discussion options

You must be logged in to vote

You missed and did not set the ZI hash and value. As described in the wiki: https://wiki.zshell.dev/docs/getting_started/installation#manual-setup

This probably happened because expected that .zshenv is always sourced which is true but it's sourced only on login or manually running: exec zsh -l.

It should be adjusted in the file: ~/.zshrc:

typeset -A ZI
ZI[BIN_DIR]="${HOME}/.zi/bin"
source "${ZI[BIN_DIR]}/zi.zsh"

then enable the completion:

autoload -Uz _zi
(( ${+_comps} )) && _comps[zi]=_zi

Alternatively can directly source Zi with no parameter:

source /your/path/to/zi.zsh

This is equal to:

typeset -A ZI
ZI[BIN_DIR]="${HOME}/.zi/bin"
source "${ZI[BIN_DIR]}/zi.zsh"

Zi will create and as…

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Kritiqual
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by ss-o
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
resolved ☑️ The issue has been fixed and is therefore considered resolved. Q&A ✍️ Questions and answers.
3 participants