marlonrichert / zsh-snap

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

auto completion not working #254

Open shdennlin opened 1 year ago

shdennlin commented 1 year ago

Describe the bug

when the first start the terminal after re-configure .zshrc file, the completion of znap will work, but after 2nd start terminal, completion will not work.

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

video demo https://github.com/marlonrichert/zsh-snap/assets/68002539/1cb7313c-ecb0-4ff5-bdb2-ccd5d0842b92

znap completions are not available:

$ which _znap
_znap not found

Environment:

Additional context

After I add the following at the end of .bashrc

znap fpath _ ':'

The completion can work normally. Why?

marlonrichert commented 1 year ago

Which terminal do you use? Can you share screenshots of the settings?

shdennlin commented 1 year ago

I have already put the demo video in https://github.com/marlonrichert/zsh-snap/issues/254#issue-1749605319 - Observed behavior Configuration can be found at 0:31 seconds

Terminal: Gnome Terminal

marlonrichert commented 1 year ago

@shdennlin Please share your terminal’s settings, not your shell’s.