Skip to content

When do I have to call compinit manually? #61

Answered by marlonrichert
borekb asked this question in Q&A
Discussion options

You must be logged in to vote

Short answer: Never. With Znap, you really never have to call compinit manually. Any completions added to your $fpath while executing the code inside your .zshrc file will be automatically passed to compinit.

Longer answer: Well, theoretically, you'd have to run compinit manually if you would add completions to your $fpath after your shell has started up. But there is no practical reason to ever do that. As long as you add your completions to your $fpath inside your .zshrc file only, then there really is no reason to ever bother running compinit manually when using Znap.

So, long story short, for your case, just put the following into your .zshrc file:

znap source agkozak/zsh-z
fpath+=( ~[…

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
5 replies
@borekb
Comment options

@marlonrichert
Comment options

@marlonrichert
Comment options

@borekb
Comment options

@marlonrichert
Comment options

Answer selected by borekb
Comment options

You must be logged in to vote
2 replies
@marlonrichert
Comment options

@borekb
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
documentation Improvements or additions to documentation
2 participants