Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [wgiokas@WST420: Re: Correct installation path for completion files]



On Jul 26,  1:41pm, William Giokas wrote:
} Subject: Re: [wgiokas@WST420: Re: Correct installation path for completion
}
} 
} On Fri, Jul 26, 2013 at 08:23:06PM +0200, Frank Terbeck wrote:
} > William Giokas wrote:
} > 
} > It's hard to make it distribution-agnostic. The best way I can think of
} > is to use the output of this as the destination directory:
} > 
} >   zsh -fc 'print ${fpath[1]}'
} 
} If vendor-functions is something special that distributions use, then
} they can specify that when they package this stuff. site-functions seems
} to be the default for zsh, so it seems that it should be the default for
} packages that install zsh completion.

Even if you choose site-functions you still need to know what path the
distribution has used as the prefix ... you've already pointed out that
RedHat-derived dists have /usr/share/zsh/site-functions/ whereas Debian
uses /usr/local/share/zsh/site-functions/.

Frank's suggestion of running zsh to grab the first directory in $fpath
is as good a way to avoid the guesswork as any.  If zsh won't run because
it's not installed, you're no worse off (and you can decide to skip the
function installation entirely).



Messages sorted by: Reverse Date, Date, Thread, Author