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

How does a new software package provide Zsh tab completion scripts to users?

I am the author of a software package and I'd like to provide Zsh tab
completion scripts for users of my package.   In particular my package is
Lmod.  It is updated tool to handle environment modules, similar to but not
exactly the same as the TCL/C based environment modules.  Its main
advantage is that makes dealing with multiple compilers and MPI stacks much
easier along with the dependent libraries and applications.

The problem is that Lmod is typically installed by system administrators
and not by users directly.   There is not a good way to tell the Zsh users
that there is tab completion scripts available.    I also do not think that
I'll get many site to put my zsh scripts in the system location.
Eventually if/when Lmod takes over the world (;->),  my completion scripts
will be in the standard zsh installation but until that day,  I'd like to
know what options are available.

To use Lmod, users must source something that defines a shell function.  In
this file, I could also prepend a directory to FPATH and do

    autoload -U compinit
    compinit -C

to make the Lmod completion available.  However  this seems like a bad
idea.  What if a Zsh user is not using tab completion?

Has this been discussed before?   I did some searching but was unable to
find anything.  I'm not sure what the right phrase would be.

Thanks for any thoughts,

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