Take the 2-minute tour ×
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.

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

1 Answer 1

up vote 5 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

 
discard

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.