zmodload [ -dL ] [ ... ]
zmodload -F [ -lLme -P param ] module [+-]feature...
zmodload -e [ -A ] [ ... ]
zmodload [ -a [ -bcpf [ -I ] ] ] [ -iL ] ...
zmodload -u [ -abcdpf [ -I ] ] [ -iL ] ...
zmodload -A [ -L ] [ modalias[=module] ... ]
zmodload -R modalias ...
       Performs operations relating to zsh's loadable mod-
       of  modules  while the shell is running (`dynamical
       not available on all operating systems, or  on  all
       on   a  particular  operating  system, although the
       itself is always available and can be used  to  ma-
       built   into   versions   of  the  shell executable
       loading.

       Without arguments the names of all currently loaded
       ules  are  printed.  The -L option causes this list
       form of a series  of  zmodload   commands.    Forms
       are:

       zmodload [ -i ] name ...
       zmodload -u [ -i ] name ...
              In   the   simplest  case,  zmodload loads a
              The module must be in a file  with  a   name
              the  specified  name  followed by a standard
              `.so' (`.sl' on HPUX).  If  the  module   to
              already  loaded  the duplicate module is ig-
              load detects an inconsistency,  such  as  an
              name   or circular dependency list, the cur-
              is   aborted.     Hence   `zmodload   module
              ficient   to test whether a module is avail-
              available, the module is  loaded  if  neces-
              is    not   available,  non-zero  status  is
              The option -i is accepted for  compatibility
              effect.

              The   named   module  is searched for in the
              mand  is,  using  $module  path  instead  of
$path.   However,

              the   path   search   is performed even when
              contains  a  `/',  which  it  usually  does.
              to prevent the path search.

              If  the  module  supports  features (see be-
              tries to enable all features when loading  a
              the  module  was successfully loaded but not
              could be enabled, zmodload returns status 2.

              With -u, zmodload unloads modules.  The same
              given   that   was given when the module was
              is not necessary for the module to exist  in
              tem.   The -i option suppresses the error if
              already unloaded (or was never loaded).

              Each module has a boot and a  cleanup  func-
              ule  will not be loaded if its boot function
              larly a module can only be unloaded  if  its
              tion runs successfully.

       zmodload  -F  [  -almLe  -P param ] module [+-]fea-
              zmodload  -F  allows more selective  control
              tures provided by modules.  With no  options
              -F,  the  module  named  module  is  loaded,
              already  loaded, and the list of features is
              required state.  If no features  are  speci-
              is loaded, if it was not already loaded, but
              features is unchanged.  Each feature may  be
              +  to  turn  the feature on, or - to turn it
              assumed if  neither  character  is  present.
              explicitly  mentioned is left in its current
              module was not previously loaded this  means
              tures will remain disabled.  The return sta-
              all  features  were  set, 1  if  the  module
              and 2 if some features could not be set (for
              parameter couldn't be  added  because  there
              parameter  of  the same name) but the module

              The standard features are builtins,   condi-
              ters  and math functions; these are indicat-
              fix `b:', `c:' (`C:' for  an  infix   condi-
              `f:',   respectively,  followed  by the name
              sponding feature would have  in  the  shell.
              `b:strftime'   indicates   a  builtin  named
              p:EPOCHSECONDS indicates a  parameter  named
              The  module  may  provide other (`abstract')
              own as indicated by its documentation; these
              fix.

              With   -l   or   -L,  features  provided  by
              listed.  With -l alone, a list  of  features
              their   states   is  shown,  one feature per
              alone, a zmodload -F  command   that   would
              features  of  the  module to be turned on is
              -lL, a zmodload -F command that would  cause
              tures   to  be set to their current state is
              of these combinations is given the option -P
              the  parameter  param  is  set  to  an array
              either features together with their state or
(if -L alone

              is given) enabled features.

              With  the  option  -L the module name may be
              list of all enabled features for  all   mod-
              features  is printed in the form of zmodload
-F commands.

              If -l is also given, the state of  both  en-
              abled features is output in that form.

              A   set of features may be provided together
              and a module name; in  that  case  only  the
              features   is  considered.  Each feature may
              + or - but the character has no effect.   If
              features  is provided, all features are con-

              With  -e,  the  command  first  tests   that
              loaded;  if it is not, status 1 is returned.
              ule  is loaded, the list of  features  given
              is examined.  Any feature given with no pre-
              tested  to  see  if   the   module  provides
              given  with a prefix + or - is tested to see
              vided  and  in  the  given  state.   If  the
              tures  in  the  list  succeed, status  0  is
              status 1.

              With  -m,  each  entry  in  the  given  list
              taken as a pattern to be matched against the
              tures  provided by the module.  An initial +
              given  explicitly.  This may not be combined
              option as autoloads must  be  specified  ex-

              With   -a,   the   given  list  of  features
              autoload from the  specified  module,  which
              loaded.    An   optional  +  may  appear be-
              name.  If the feature is prefixed  with   -,
              autoload   is   removed.  The options -l and
-L may be used

              to list autoloads.  Autoloading is  specific
              features;   when  the  module is loaded only
              feature is enabled.  Autoload  requests  are
              the   module  is  subsequently  unloaded un-
              `zmodload -Fa module  -feature'  is  issued.
              error   to   request  an autoload for a fea-
              that is already loaded.

              When the  module  is  loaded  each  autoload
              against   the  features actually provided by
              the feature is  not  provided  the  autoload
              deleted.    A  warning message is output; if
              being loaded to provide a   different   fea-
              autoload   is successful, there is no effect
              of the current command.  If  the  module  is
              at the time when zmodload -Fa is run, an er-
              printed and status 1 returned.

              zmodload -Fa can be used with  the  -l,  -L,
-e  and  -P

              options    for    listing  and  testing  the
              autoloadable features.  In this case  -l  is
              is  specified.   zmodload  -FaL with no mod-
              autoloads for all modules.

              Note that  only  standard  features  as  de-
              be  autoloaded;  other  features require the
              loaded before enabling.

       zmodload -d [ -L ] [ name ]
       zmodload -d name dep ...
       zmodload -ud name [ dep ... ]
              The -d option can be used to specify  module
              The   modules named in the second and subse-
              will be loaded before the  module  named  in
              ment.

              With   -d and one argument, all dependencies
              ule are listed.  With -d and  no  arguments,
              dependencies are listed.  This listing is by
              Makefile-like format.  The -L option changes
              to a list of zmodload -d commands.

              If -d and -u are both used, dependencies are
              only one argument is given,  all   dependen-
              module are removed.

       zmodload -ab [ -L ]
       zmodload -ab [ -i ] name [ builtin ... ]
       zmodload -ub [ -i ] builtin ...
              The     -ab    option   defines   autoloaded
              the specified builtins.  When any of   those
              called,   the   module   specified   in  the
              loaded and all  its  features  are   enabled
(for  selective

              control  of  features  use  `zmodload -F -a'
              above).  If only  the  name  is  given,  one
              defined,  with  the same name as the module.
-i suppresses

              the  error  if  the  builtin   is    already
              autoloaded,   but  not if another builtin of
              is already defined.

              With -ab and no arguments,  all   autoloaded
              listed,   with   the  module  name  (if dif-
              parentheses   after   the   builtin    name.
              changes this format to a list of zmodload -a

              If  -b  is  used  together with the  -u  op-
              builtins  previously defined with -ab.  This
              sible  if  the  builtin is not  yet  loaded.
-i suppresses

              the  error  if  the builtin is  already  re-
              existed).

              Autoload  requests   are   retained  if  the
              quently unloaded until an explicit `zmodload
-ub builtin'

              is issued.

       zmodload -ac [ -IL ]
       zmodload -ac [ -iI ] name [ cond ... ]
       zmodload -uc [ -iI ] cond ...
              The  -ac  option  is   used  to  define  au-
              codes.  The  cond  strings give the names of
              defined  by the module. The optional -I  op-
              define  infix  condition names. Without this
              condition names are defined.

              If given no  condition  names,  all  defined
              (as  a  series  of zmodload commands if  the
-L  option  is

              given).

              The  -uc option removes definitions for  au-
              tions.

       zmodload -ap [ -L ]
       zmodload -ap [ -i ] name [ parameter ... ]
       zmodload -up [ -i ] parameter ...
              The  -p  option  is  like the -b and -c  op-
              zmodload work on autoloaded  parameters  in-

       zmodload -af [ -L ]
       zmodload -af [ -i ] name [ function ... ]
       zmodload -uf [ -i ] function ...
              The  -f  option  is  like the -b, -p, and -c
              makes zmodload work on autoloaded math func-

       zmodload -a [ -L ]
       zmodload -a [ -i ] name [ builtin ... ]
       zmodload -ua [ -i ] builtin ...
              Equivalent to -ab and -ub.

       zmodload -e [ -A ] [ string ... ]
              The  -e  option  without arguments lists all
              if  the  -A  option  is also  given,  module
              sponding  to  loaded modules are also shown.
              are  provided,  nothing  is printed; the re-
              set  to  zero  if all strings given as argu-
              of loaded modules and to one if at least  on
              the  name  of  a loaded module.  This can be
              for  the  availability  of things implement-
              In  this case, any aliases are automatically
              the -A flag is not used.

       zmodload -A [ -L ] [ modalias[=module] ... ]
              For each argument, if both modalias and mod-
              define  modalias to be an alias for the mod-
              the  module  modalias  is  ever  subsequent-
              either  via a call to zmodload or  implicit-
              will  attempt  to  load module instead.   If
              given,  show the definition of modalias.  If
              are  given,  list all defined module  alias-
              ing,  if  the  -L  flag was also given, list
              as a zmodload command to recreate the alias.

              The  existence of  aliases  for  modules  is
              pendent of whether the name resolved is  ac-
              as  a module: while the alias exists,  load-
              ing  the  module under  any  alias  has  ex-
              effect  as  using  the  resolved  name,  and
              the  connection  between  the alias and  the
              which can be removed either by  zmodload  -R
              ing  the  alias.   Chains  of  aliases (i.e.
              resolved  name  is   itself  an  alias)  are
              these  are  not  circular.   As the  aliases
              format as module  names,  they  may  include
              in  this  case,  there is no requirement for
              path  named to exist as the  alias  will  be
              For  example,  `any/old/alias'  is  always a

              Dependencies added to  aliased  modules  are
              to  the  resolved  module;  these  remain if
              removed.  It is valid  to  create  an  alias
              one  of the standard shell modules and which
              different module.  However, if a module  has
              it  will  not  be  possible  to use the mod-
              alias as the module will already  be  marked
              module in its own right.

              Apart from the above, aliases can be used in
              command anywhere  module   names   are   re-
              aliases will not be shown in lists of loaded
              a bare `zmodload'.

       zmodload -R modalias ...
              For each modalias argument that  was  previ-
              a  module  alias via zmodload -A, delete the
              was not defined, an error is caused and  the
              the line is ignored.

       Note  that  zsh  makes  no distinction between mod-
       linked into the shell and modules that are   loaded
       In  both  cases this builtin command has to be used
       able the builtins  and  other  things  defined   by
       the  module  is  autoloaded  on these definitions).
       even for systems that don't support dynamic loading
