marlonrichert / zsh-snap

⚡️ Znap! Fast, easy-to-use tools for Zsh dotfiles & plugins, plus git repos
MIT License
1.32k stars 38 forks source link

`znap/functions` directory is not added to `$fpath` #249

Closed whi-tw closed 1 year ago

whi-tw commented 1 year ago

Describe the bug

znap's functions directory is not added to $fpath automatically

This means that _znap is not available, so completions aren't available for znap itself.

Adding fpath=(~/.znap/zsh-snap/functions $fpath) to .zshrc after sourcing znap.zsh brings them back

Steps To Reproduce

# file: .zshrc
[[ -r ~/.znap/zsh-snap/znap.zsh ]] || {
    git clone --depth 1 -- \
        https://github.com/marlonrichert/zsh-snap.git ~/.znap/zsh-snap
}
source ~/.znap/zsh-snap/znap.zsh

Expected behavior

znap completions are available

Observed behavior

znap completions are not available:

❯ which _znap
_znap not found

Environment: