Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I noticed I have the following line near the beginning of my .zshrc file:

export FPATH=/usr/share/zsh/site-functions:/usr/share/zsh/4.2.6/functions:$FPATH  

I can't remember if I typed this myself or if this line was automatically generated by zsh-newuser-install.

Is it assumed that the user types those paths in FPATH in a startup file? What's the difference between functions and site-functions?

share|improve this question
up vote 8 down vote accepted

The 4.2.6/functions directory contains functions shipped with zsh 4.2.6. The site-functions directory contains functions that are added by third-party packages or by the local administrator; under Linux the local administrator would usually use a site-functions directory under /usr/local.

Normally these directories would be in the default fpath setting built into the zsh executable, it's strange that you would need to add them. I don't see any code in zsh-newuser-install that would add these lines; it looks like something your site administrator or you wrote.

Note that the FPATH string variable is tied to the fpath array variable, so you could write

fpath=(/some/extra/directory $fpath)
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.