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

XML version of completion function



Here are some first drafts of a couple XML examples based on the
_zip & _find files.  While I haven't done it, it seems to me that
it wouldn't be difficult to use these files to generate equivalent
versions of the existing _zip & _find files.

These files becomes more readable in an XML viewer that can collapse
elements (e.g. emacs?, gxmlviewer, IBM's XML viewer).  Though several
of these have some difficulty showing the help text in a useful
manor.

Some of the features in this draft:

    *) The ability to specify language for descriptions/explanations
    using the xml:lang attribute.

    *) The ability to add documentation from the man page of zip and
    zsh.  The _arguments specific flag documentation, and help on the
    zip options.

    *) Ability to specify other completions, such as for the ZIPOPT
    environment variable.  Though this hasn't really been thought
    out, not quite sure how the completion function would be
    generated based on this format.

Some things missing that I wanted to add

    *) Ability to reuse exclusion groups. Make a definition and then
    reuse it for all the options.

    *) Reuse a set of flags with a small set of edits. Not all of
    zip's flags can be used with ZIPOPT, there should be an easy way
    to take a set of flags an delete/add some.

    *) More of the options (!+=- etc.) that can be placed in the
    optspecs.

    *) Ability to specify compdef options.

    *) Show equivalent flags.


Some of the things I like about this format: *) Appropriate
documentation can be inserted at the place where you need it.
Whether it be zsh-specific or command-specific.  Also, it leaves open
additional sources of documentation such as the file's author (i.e.
comments.)

    *) I think it is straight forward to convert this file into
    zsh scripts.  (Though, it might take a little XSL work. ) The
    structure of the xml is strongly tied to the _arguments format,
    Also it is tied to some extent to the completion file format,
    though I haven't done survey of common file structures, if there
    is such a thing.

    *) There is a mechanism for handling non-declarative parts (i.e.
    code blocks).

Some of the things I don't like about this format:

    *) The xml is about 14 times the size of the shell version in the
    case of _zip.

    *) Missing stuff to handle repeated information, such as
    exclusion lists.

    *) More difficult to comprehend what is happening without an XML
    editor.  And even with that, pertinent information takes some
    work to find.


My original goal was to make it easier to create new functions.  So
the next thing I would like to do is markup the usage output from a
command.  I'd like that format to be easy to modify by hand, and then
taking that hand edit and transform it into the format I've shown for
_find and _zip.  I'll try to send that out next week.

Does this seem useful, yet?  Any suggestions for making it better?

-FR.


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/
<?xml version='1.0'?>
<completion version='.01'>
    <filename>_find</filename>
        <service name=''>
            <argspecs>
              <argspec>
                <optspec>
                  <flagarg name='-daystart'>
                    <more_than_once/>
                     <help name='-daystart' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Measure times (for -amin,  -atime,  -cmin,  -ctime,
                       -mmin,  and  -mtime)  from  the  beginning of today
                       rather than from 24 hours ago.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-depth'>
                    <more_than_once/>
                     <help name='-depth' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Process each directory's contents before the direc-
                       tory itself.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-follow'>
                    <more_than_once/>
                     <help name='-follow' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Dereference symbolic links.  Implies -noleaf.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-help'>
                    <more_than_once/>
                     <help name='-help' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Print  a  summary of the command-line usage of find
                       and exit.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-maxdepth'>
                    <more_than_once/>
                     <help name='-maxdepth' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Descend at most  levels  (a  non-negative  integer)
                       levels  of directories below the command line argu-
                       ments.  `-maxdepth 0' means only  apply  the  tests
                       and actions to the command line arguments.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>maximum search depth</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-mindepth'>
                    <more_than_once/>
                     <help name='-mindepth' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Do  not  apply  any tests or actions at levels less
                       than levels (a non-negative  integer).   `-mindepth
                       1'  means process all files except the command line
                       arguments.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>minimum search depth</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-mount'>
                    <more_than_once/>
                     <help name='-mount' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Don't descend directories on other filesystems.  An
                       alternate  name  for  -xdev, for compatibility with
                       some other versions of find.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-noleaf'>
                    <more_than_once/>
                     <help name='-noleaf' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Do not optimize by assuming that  directories  con-
                       tain  2  fewer  subdirectories than their hard link
                       count.   This  option  is  needed  when   searching
                       filesystems  that do not follow the Unix directory-
                       link convention, such as CD-ROM or MS-DOS  filesys-
                       tems or AFS volume mount points.  Each directory on
                       a normal Unix filesystem has at least 2 hard links:
                       its  name  and  its  `.'  entry.  Additionally, its
                       subdirectories (if any) each  have  a  `..'   entry
                       linked to that directory.  When find is examining a
                       directory, after it has statted 2 fewer subdirecto-
                       ries than the directory's link count, it knows that
                       the rest of the entries in the directory  are  non-
                       directories  (`leaf'  files in the directory tree).
                       If only the files' names need to be examined, there
                       is  no  need to stat them; this gives a significant
                       increase in search speed.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-version'>
                    <more_than_once/>
                     <help name='-version' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Print the find version number and exit.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-xdev'>
                    <more_than_once/>
                     <help name='-xdev' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[

                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-amin'>
                    <more_than_once/>
                     <help name='-amin' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File was last accessed n minutes ago.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>access time (minutes)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-cmin'>
                    <more_than_once/>
                     <help name='-cmin' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File's status was last changed n minutes ago.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>inode change time (minutes)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-mmin'>
                    <more_than_once/>
                     <help name='-mmin' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File's data was last modified n minutes ago.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>modification time (minutes)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-atime'>
                    <more_than_once/>
                     <help name='-atime' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File was last accessed n*24 hours ago.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>access time (days)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-ctime'>
                    <more_than_once/>
                     <help name='-ctime' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File's status was last changed n*24 hours ago.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>inode change time (days)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-mtime'>
                    <more_than_once/>
                     <help name='-mtime' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File's data was last modified n*24 hours ago.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>modification time (days)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-anewer'>
                    <more_than_once/>
                     <help name='-anewer' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File was last accessed more recently than file  was
                       modified.   -anewer  is affected by -follow only if
                       -follow comes before -anewer on the command line.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>file to compare (access time)</message>
                  <action>
                    <command>_files</command>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-cnewer'>
                    <more_than_once/>
                     <help name='-cnewer' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File's status was last changed more  recently  than
                       file  was modified.  -cnewer is affected by -follow
                       only if -follow comes before -cnewer on the command
                       line.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>file to compare (inode change time)</message>
                  <action>
                    <command>_files</command>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-newer'>
                    <more_than_once/>
                     <help name='-newer' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File was modified more recently than file.   -newer
                       is affected by -follow only if -follow comes before
                       -newer on the command line.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>file to compare (modification time)</message>
                  <action>
                    <command>_files</command>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-used'>
                    <more_than_once/>
                     <help name='-used' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File was last accessed n days after its status  was
                       last changed.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>access after inode change (days)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-empty'>
                    <more_than_once/>
                     <help name='-empty' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       directory.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-false'>
                    <more_than_once/>
                     <help name='-false' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Always false.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-fstype'>
                    <more_than_once/>
                     <help name='-fstype' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File is on a filesystem of type  type.   The  valid
                       filesystem  types  vary among different versions of
                       Unix; an incomplete list of filesystem  types  that
                       are accepted on some version of Unix or another is:
                       ufs, 4.2, 4.3, nfs, tmp, mfs, S51K, S52K.  You  can
                       use  -printf with the %F directive to see the types
                       of your filesystems.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>filesystem type</message>
                  <action>
                    <fixed_set>
                      <fixed_string>
                        <value>ufs</value>
                        <description></description>
                      </fixed_string>
                      <fixed_string>
                        <value>4.2</value>
                        <description></description>
                      </fixed_string>
                      <fixed_string>
                        <value>4.3</value>
                        <description></description>
                      </fixed_string>
                      <fixed_string>
                        <value>nfs</value>
                        <description></description>
                      </fixed_string>
                      <fixed_string>
                        <value>tmp</value>
                        <description></description>
                      </fixed_string>
                      <fixed_string>
                        <value>mfs</value>
                        <description></description>
                      </fixed_string>
                      <fixed_string>
                        <value>S51K</value>
                        <description></description>
                      </fixed_string>
                      <fixed_string>
                        <value>S52K</value>
                        <description></description>
                      </fixed_string>
                    </fixed_set>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-gid'>
                    <more_than_once/>
                     <help name='-gid' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File's numeric group ID is n.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>numeric group ID</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-group'>
                    <more_than_once/>
                     <help name='-group' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File belongs  to  group  gname  (numeric  group  ID
                       allowed).
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>group</message>
                  <action>
                    <command>_groups</command>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-uid'>
                    <more_than_once/>
                     <help name='-uid' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File's numeric user ID is n.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>numeric user ID</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-user'>
                    <more_than_once/>
                     <help name='-user' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File  is  owned  by  user  uname  (numeric  user ID
                       allowed).
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>user</message>
                  <action>
                    <command>_users</command>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-lname'>
                    <more_than_once/>
                     <help name='-lname' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File  is a symbolic link whose contents match shell
                       pattern pattern.  The metacharacters do  not  treat
                       `/' or `.' specially.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>link pattern to search</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-ilname'>
                    <more_than_once/>
                     <help name='-ilname' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Like -lname, but the match is case insensitive.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>link pattern to search (case insensitive)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-name'>
                    <more_than_once/>
                     <help name='-name' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Base of file name (the path with the leading direc-
                       tories removed) matches shell pattern pattern.  The
                       metacharacters  (`*', `?', and `[]') do not match a
                       `.' at the start of the base  name.   To  ignore  a
                       directory  and  the files under it, use -prune; see
                       an example in the description of -path.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>name pattern to search</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-iname'>
                    <more_than_once/>
                     <help name='-iname' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Like -name, but the match is case insensitive.  For
                       example, the patterns `fo*'  and  `F??'  match  the
                       file names `Foo', `FOO', `foo', `fOo', etc.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>name pattern to search (case insensitive)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-path'>
                    <more_than_once/>
                     <help name='-path' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File  name  matches  shell  pattern  pattern.   The
                       metacharacters  do  not treat `/' or `.' specially;
                       so, for example,
                                 find . -path './sr*sc'
                       will  print  an  entry  for  a   directory   called
                       './src/misc'  (if  one  exists).  To ignore a whole
                       directory tree, use  -prune  rather  than  checking
                       every  file  in the tree.  For example, to skip the
                       directory `src/emacs' and all files and directories
                       under  it,  and  print the names of the other files
                       found, do something like this:
                                 find  .  -path  './src/emacs'  -prune  -o
                                 -print
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>path pattern to search</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-ipath'>
                    <more_than_once/>
                     <help name='-ipath' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Like -path, but the match is case insensitive.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>path pattern to search (case insensitive)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-regex'>
                    <more_than_once/>
                     <help name='-regex' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File name matches regular expression pattern.  This
                       is a match on the whole path, not  a  search.   For
                       example,  to match a file named `./fubar3', you can
                       use the regular expression  `.*bar.'  or  `.*b.*3',
                       but not `b.*r3'.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>regular expression to search</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-iregex'>
                    <more_than_once/>
                     <help name='-iregex' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Like -regex, but the match is case insensitive.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>regular expression to search (case insensitive)</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-inum'>
                    <more_than_once/>
                     <help name='-inum' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File has inode number n.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>inode number</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-links'>
                    <more_than_once/>
                     <help name='-links' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File has n links.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>number of links</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-nouser'>
                    <more_than_once/>
                     <help name='-nouser' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       No user corresponds to file's numeric user ID.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-nogroup'>
                    <more_than_once/>
                     <help name='-nogroup' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       No group corresponds to file's numeric group ID.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-perm'>
                    <more_than_once/>
                     <help name='-perm' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Any of the permission bits mode  are  set  for  the
                       file.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>file permission bits</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-size'>
                    <more_than_once/>
                     <help name='-size' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File uses n units of space.  The units are 512-byte
                       blocks by default or if `b' follows n, bytes if `c'
                       follows  n,  kilobytes  if `k' follows n, or 2-byte
                       words if `w' follows n.  The size  does  not  count
                       indirect blocks, but it does count blocks in sparse
                       files that are not actually allocated.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>file size</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-true'>
                    <more_than_once/>
                     <help name='-true' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[

                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-type'>
                    <more_than_once/>
                     <help name='-type' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       File is of type c:

                       b      block (buffered) special

                       c      character (unbuffered) special

                       d      directory

                       p      named pipe (FIFO)

                       f      regular file

                       l      symbolic link

                       s      socket
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>file type</message>
                  <action>
                    <fixed_set>
                      <fixed_string>
                        <value>b</value>
                        <description>block special file</description>
                      </fixed_string>
                      <fixed_string>
                        <value>c</value>
                        <description>character special file</description>
                      </fixed_string>
                      <fixed_string>
                        <value>d</value>
                        <description>directory</description>
                      </fixed_string>
                      <fixed_string>
                        <value>p</value>
                        <description>named pipe</description>
                      </fixed_string>
                      <fixed_string>
                        <value>f</value>
                        <description>normal file</description>
                      </fixed_string>
                      <fixed_string>
                        <value>l</value>
                        <description>symbolic link</description>
                      </fixed_string>
                      <fixed_string>
                        <value>s</value>
                        <description>socket</description>
                      </fixed_string>
                    </fixed_set>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-xtype'>
                    <more_than_once/>
                     <help name='-xtype' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       The same as -type unless the  file  is  a  symbolic
                       link.   For symbolic links: if -follow has not been
                       given, true if the file is a link to a file of type
                       c; if -follow has been given, true if c is `l'.  In
                       other words, for symbolic links, -xtype checks  the
                       type of the file that -type does not check.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>file type</message>
                  <action>
                    <fixed_set>
                      <fixed_string>
                        <value>b</value>
                        <description>block special file</description>
                      </fixed_string>
                      <fixed_string>
                        <value>c</value>
                        <description>character special file</description>
                      </fixed_string>
                      <fixed_string>
                        <value>d</value>
                        <description>directory</description>
                      </fixed_string>
                      <fixed_string>
                        <value>p</value>
                        <description>named pipe</description>
                      </fixed_string>
                      <fixed_string>
                        <value>f</value>
                        <description>normal file</description>
                      </fixed_string>
                      <fixed_string>
                        <value>l</value>
                        <description>symbolic link</description>
                      </fixed_string>
                      <fixed_string>
                        <value>s</value>
                        <description>socket</description>
                      </fixed_string>
                    </fixed_set>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-exec'>
                    <more_than_once/>
                     <help name='-exec' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Execute command; true if 0 status is returned.  All
                       following arguments to find are taken to  be  argu-
                       ments  to  the command until an argument consisting
                       of `;' is encountered.  The string `{}' is replaced
                       by the current file name being processed everywhere
                       it occurs in the arguments to the command, not just
                       in arguments where it is alone, as in some versions
                       of find.  Both of these constructions might need to
                       be  escaped  (with a `\') or quoted to protect them
                       from expansion by the shell.  The command  is  exe-
                       cuted in the starting directory.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>program</message>
                  <action>
                    <add_no_compadd_args/>
                    <command>_command_names -e</command>
                  </action>
                </description>
                <last_description>
                  <ends_with_pattern>\;</ends_with_pattern>
                  <message>program arguments</message>
                  <limit_words_to_arg/>
                  <action>
                    <add_no_compadd_args/>
                    <command>_normal</command>
                  </action>
                </last_description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-ok'>
                    <more_than_once/>
                     <help name='-ok' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       Like -exec but ask the user first (on the  standard
                       input);  if the response does not start with `y' or
                       `Y', do not run the command, and return false.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>program</message>
                  <action>
                    <add_no_compadd_args/>
                    <command>_command_names -e</command>
                  </action>
                </description>
                <last_description>
                  <ends_with_pattern>\;</ends_with_pattern>
                  <message>program arguments</message>
                  <limit_words_to_arg/>
                  <action>
                    <add_no_compadd_args/>
                    <command>_normal</command>
                  </action>
                </last_description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-fls'>
                    <more_than_once/>
                     <help name='-fls' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       True; like -ls but write to file like -fprint.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>output file</message>
                  <action>
                    <command>_files</command>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-fprint'>
                    <more_than_once/>
                     <help name='-fprint' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       True;  print the full file name into file file.  If
                       file does not exist when find is run,  it  is  cre-
                       ated;  if it does exist, it is truncated.  The file
                       names ``/dev/stdout'' and ``/dev/stderr'' are  han-
                       dled  specially;  they refer to the standard output
                       and standard error output, respectively.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>output file</message>
                  <action>
                    <command>_files</command>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-fprint0'>
                    <more_than_once/>
                     <help name='-fprint0' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       True; like -print0 but write to file like  -fprint.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>output file</message>
                  <action>
                    <command>_files</command>
                  </action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-fprintf'>
                    <more_than_once/>
                     <help name='-fprintf' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       True;  like -printf but write to file like -fprint.
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>output file</message>
                  <action>
                    <command>_files</command>
                  </action>
                </description>
                <description>
                  <message>output format</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-print'>
                    <more_than_once/>
                     <help name='-print' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       True; print the full file name on the standard out-
                       put, followed by a newline.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-print0'>
                    <more_than_once/>
                     <help name='-print0' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       True; print the full file name on the standard out-
                       put, followed by a  null  character.   This  allows
                       file  names  that  contain newlines to be correctly
                       interpreted by programs that process the find  out-
                       put.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-printf'>
                    <more_than_once/>
                     <help name='-printf' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       True;  print  format on the standard output, inter-
                       preting `\'  escapes  and  `%'  directives.   Field
                       widths  and precisions can be specified as with the
                       `printf' C function.  Unlike -print,  -printf  does
                       not  add  a  newline at the end of the string.  The
                       escapes and directives are:

                       \a     Alarm bell.

                       \b     Backspace.

                       \c     Stop printing from this  format  immediately
                              and flush the output.

                       \f     Form feed.

                       \n     Newline.

                       \r     Carriage return.

                       \t     Horizontal tab.

                       \v     Vertical tab.

                       \\     A literal backslash (`\').

                       A  `\' character followed by any other character is
                       treated as an ordinary character, so they both  are
                       printed.

                       %%     A literal percent sign.

                       %a     File's   last  access  time  in  the  format
                              returned by the C `ctime' function.

                       %Ak    File's last access time in the format speci-
                              fied  by  k, which is either `@' or a direc-
                              tive for the  C  `strftime'  function.   The
                              possible values for k are listed below; some
                              of them might not be available on  all  sys-
                              tems,   due  to  differences  in  `strftime'
                              between systems.

                               @      seconds since Jan.  1,  1970,  00:00
                                      GMT.

                              Time fields:

                               H      hour (00..23)

                               I      hour (01..12)

                               k      hour ( 0..23)

                               l      hour ( 1..12)

                               M      minute (00..59)

                               p      locale's AM or PM

                               r      time, 12-hour (hh:mm:ss [AP]M)

                               S      second (00..61)

                               T      time, 24-hour (hh:mm:ss)

                               X      locale's time representation (H:M:S)

                               Z      time zone (e.g., EDT), or nothing if
                                      no time zone is determinable

                              Date fields:

                               a      locale's  abbreviated  weekday  name
                                      (Sun..Sat)

                               A      locale's full weekday name, variable
                                      length (Sunday..Saturday)

                               b      locale's   abbreviated   month  name
                                      (Jan..Dec)

                               B      locale's full month  name,  variable
                                      length (January..December)

                               c      locale's  date  and time (Sat Nov 04
                                      12:02:33 EST 1989)

                               d      day of month (01..31)

                               D      date (mm/dd/yy)

                               h      same as b

                               j      day of year (001..366)

                               m      month (01..12)

                               U      week number of year with  Sunday  as
                                      first day of week (00..53)

                               w      day of week (0..6)

                               W      week  number  of year with Monday as
                                      first day of week (00..53)

                               x      locale's     date     representation
                                      (mm/dd/yy)

                               y      last two digits of year (00..99)

                               Y      year (1970...)

                       %b     File's size in 512-byte blocks (rounded up).

                       %c     File's last status change time in the format
                              returned by the C `ctime' function.

                       %Ck    File's last status change time in the format
                              specified by k, which is the same as for %A.

                       %d     File's  depth in the directory tree; 0 means
                              the file is a command line argument.

                       %f     File's name  with  any  leading  directories
                              removed (only the last element).

                       %F     Type  of the filesystem the file is on; this
                              value can be used for -fstype.

                       %g     File's group name, or numeric  group  ID  if
                              the group has no name.

                       %G     File's numeric group ID.

                       %h     Leading  directories of file's name (all but
                              the last element).

                       %H     Command line argument under which  file  was
                              found.

                       %i     File's inode number (in decimal).

                       %k     File's size in 1K blocks (rounded up).

                       %l     Object  of  symbolic  link  (empty string if
                              file is not a symbolic link).

                       %m     File's permission bits (in octal).

                       %n     Number of hard links to file.

                       %p     File's name.

                       %P     File's name with the  name  of  the  command
                              line  argument  under  which  it  was  found
                              removed.

                       %s     File's size in bytes.

                       %t     File's last modification time in the  format
                              returned by the C `ctime' function.

                       %Tk    File's  last modification time in the format
                              specified by k, which is the same as for %A.

                       %u     File's  user name, or numeric user ID if the
                              user has no name.

                       %U     File's numeric user ID.

                       A `%' character followed by any other character  is
                       discarded (but the other character is printed).
                     ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>output format</message>
                  <action></action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-prune'>
                    <more_than_once/>
                     <help name='-prune' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       If  -depth  is  not given, true; do not descend the
                       current directory.
                       If -depth is given, false; no effect.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-ls'>
                    <more_than_once/>
                     <help name='-ls' source='manpage' xml:lang='en'
                           format='preformattedtext'><![CDATA[
                       True; list current file in  `ls  -dils'  format  on
                       standard  output.   The  block  counts  are  of  1K
                       blocks,    unless    the    environment    variable
                       POSIXLY_CORRECT  is  set,  in  which  case 512-byte
                       blocks are used.
                     ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <anyposition/>
                </optspec>
                <description>
                  <message>directory</message>
                  <action>
                    <command>_files -/</command>
                  </action>
                </description>
              </argspec>
            </argspecs>
        </service>
</completion>
<?xml version='1.0'?>
<completion version='.01'>
    <filename>_zip</filename>
    <prolog>
        <code>
        local suffixes suf zipfile izip
        local expl curcontext="$curcontext" state line
        typeset -A opt_args
        </code>
    </prolog>
    <services>
        <service name='zip'>
            <also_completes>
                <env>ZIPOPT</env>
            </also_completes>
<!-- -C -s -->
            <arguments>
                    <help source="zsh" xml:lang="en-us"
                          format="text" level="full">
                    The argoption elements are used to specify the flags that
                    _arguments takes.  If the "use" attribute is set to "false"
                    this argoption will not be generated.
                    </help>
                    <argoption use="false">
                        <name>-A</name>
                        <help source="zsh" xml:lang="en-us"
                              format="text" level="full">
                            With -A, no options will be completed after
                            the first non-option argument on the line.
                            The -A has to be followed by a pattern
                            matching all strings which are not to be
                            taken as arguments. For example, to make
                            _arguments stop completing options after
                            the first normal argument, but ignoring all
                            strings starting with a hyphen even if they
                            are not described by one of the optspecs,
                            one would use: `-A "-*"'.
                        </help>
                        <value></value>
                    </argoption>
                    <argoption>
                        <name>-C</name>
                        <help source="zsh" xml:lang="en-us"
                              format="text" level="full">
                            The option -C can be given to make
                            _arguments modify the curcontext parameter
                            when an action of the form `-&gt;state' is
                            used. This parameter is used to keep track
                            of the current context and in this case it
                            (and not the parameter context as explained
                            above) has to be made local to make sure
                            that calling functions don't use the
                            modified value.
                        </help>
                    </argoption>
                    <argoption use="false">
                        <name>-O</name>
                        <help level="full" format="text" xml:lang="en-us"
                              source="zsh">    
                            This flag takes one argument like `-O name'. The
                            name will be taken as the name of an array
                            and its elements will be given to functions
                            called to generate matches when execut­ ing
                            the actions.  For example, this allows one
                            to give options for the compadd builtin that
                            should be used for all actions.
                        </help>
                        <value></value>
                    </argoption>
                    <argoption use="false">
                        <name>-R</name>
                        <help level="full" format="text" xml:lang="en-us"
                              source="zsh">
                            The function returns with a non-zero return
                            value if the cursor is not in a position
                            where options can be completed or if the
                            current word could not be completed to an
                            option.  But if the -R option is given to
                            _arguments, the function will instead return
                            with a return value of 300 (to make it
                            distinguishable from other return values)
                            after setting the global `context', `line'
                            and `opt_args' parameters, and without
                            resetting any changes made to the special
                            parameters such as PREFIX and words.  This
                            enables wrapper functions around _arguments
                            to be able to find out if they have to make
                            sure that the special completion parameters
                            are not reset when they return.

                        </help>
                    </argoption>
                    <argoption use="false">
                        <name>-w</name>
                        <help level="full" format="text" xml:lang="en-us"
                              source="zsh">
                          Used with the"-s" flag to say that more option
                          characters are to be expected even after an
                          option that takes an argument.  For example,
                          if a command takes the options `a' and `b',
                          where `a' takes an argument in the next word,
                          _arguments would normally not complete the
                          other option directly after `-a', but it would
                          allow that if given the -w option.
                        </help>
                    </argoption>
                    <argoption >
                        <name>-s</name>
                        <help level="full" format="text" xml:lang="en-us"
                              source="zsh">
                          Option names represented by optname are
                          normally taken to be multi-character names,
                          and a word from the line is considered to
                          contain only one option (or none).  By giving
                          the -s option to _arguments before the first
                          spec, each optname is considered to be a
                          single character and each word from the
                          line may contain more than one such option
                          letter.  However, words beginning with two
                          hyphens (like `--prefix') are still considered
                          to contain only one option name.  This allows
                          the use of the `-s' option to describe
                          single-letter options together with such long
                          option names.

                          The -s option can be combined with the "-w" or "-W"
                          option.
                        </help>
                    </argoption>
                    <argoption use="false">
                        <name>-W</name>
                        <help level="full" format="text" xml:lang="en-us"
                              source="zsh">
                          Similarly, the option -W may be given together
                          with -s to force completion of sin­ gle-letter
                          options even after options that get an
                          argument in the same word.  For exam­ ple,
                          if a command takes the options `a' and `b',
                          where `a' needs an argument in the same
                          word, directly after the option character,
                          _arguments would normally only execute the
                          action for that argument and not offer other
                          single-letter options as possible comple­
                          tions.  If given the -W option, it will offer
                          other options as possible completions after
                          executing the action for the argument.  Note
                          that, depending on the action, this may
                          mean that the other options can't really be
                          completed, but at least they will be listed.
                          For more control, use an utility function like
                          _guard in the argument's action.
                        </help>
                    </argoption>
                    <argoption use="false">
                        <name>-M</name>
                        <help level="full" format="text" xml:lang="en-us"
                              source="zsh">
                            The -M option followed by a string may be
                            given before the first description. The
                            string will be used as the match
                            specification when completing option names
                            and values instead of the default
                            `r:|[_-]=* r:|=*'.

                        </help>
                        <value/>
                    </argoption>
                    <argoption use="false">
                        <name> -S</name>
                        <help source="zsh" xml:lang="en-us" format="text">
                          With -S, no option will be completed after
                          a `--' on the line and this argument will
                          otherwise be ignored.
                        </help>
                    </argoption>
            </arguments>
            <argspecs>
              <argspec>
                <optspec>
                  <flagarg name='-f'>
                    <explanation source='' xml:lang='en-us'>
                    freshen: only changed files
                    </explanation>
                    <help name='-f' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Replace (freshen) an  existing  entry  in  the  zip
              archive  only if it has been modified more recently
              than the version already in the zip archive; unlike
              the update option (-u) this will not add files that
              are not already in the zip archive.  For example:

                     zip -f foo

              This command should be run from the same  directory
              from  which the original zip command was run, since
              paths stored in zip archives are always relative.

              Note that  the  timezone  environment  variable  TZ
              should  be  set  according to the local timezone in
              order for the -f , -u and -o options to  work  cor-
              rectly.

              The  reasons  behind  this  are somewhat subtle but
              have to do with the differences between  the  Unix-
              format  file  times (always in GMT) and most of the
              other operating systems (always local time) and the
              necessity  to  compare the two.  A typical TZ value
              is ``MET-1MEST'' (Middle European time  with  auto-
              matic  adjustment  for  ``summertime''  or Daylight
              Savings Time).
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-d'>
                    <explanation source='' xml:lang='en-us'>
                    delete entries in zipfile
                    </explanation>

                    <help name='-d' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Remove  (delete)  entries  from a zip archive.  For
              example:

                     zip -d foo foo/tom/junk foo/harry/\* \*.o

              will remove the  entry  foo/tom/junk,  all  of  the
              files  that  start  with foo/harry/, and all of the
              files that end with .o (in any  path).   Note  that
              shell  pathname  expansion  has been inhibited with
              backslashes, so that zip  can  see  the  asterisks,
              enabling  zip  to  match on the contents of the zip
              archive instead of  the  contents  of  the  current
              directory.

              Under  MSDOS,  -d is case sensitive when it matches
              names in the zip archive.  This requires that  file
              names  be entered in upper case if they were zipped
              by PKZIP on an MSDOS system.
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-R'>
                    <explanation source='' xml:lang='en-us'>
                    recurse into directories
                    </explanation>

                    <help name='-R' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Travel the directory structure recursively starting
              at the current directory; for example:

                     zip -R foo '*.c'

              In  this  case,  all  the files matching *.c in the
              tree starting at the current directory  are  stored
              into  a  zip archive named foo.zip.  Note for PKZIP
              users: the equivalent command is

                     pkzip -rP foo *.c
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-q'>
                    <explanation source='' xml:lang='en-us'>
                    quiet operation
                    </explanation>
                    <help name='-q' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Quiet  mode;  eliminate  informational messages and
              comment prompts.  (Useful, for  example,  in  shell
              scripts and background tasks).
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-c'>
                    <explanation source='' xml:lang='en-us'>
                    add one-line comments
                    </explanation>
                    <help name='-c' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Add  one-line  comments for each file.  File opera-
              tions (adding, updating) are done  first,  and  the
              user  is  then  prompted for a one-line comment for
              each file.  Enter the comment followed  by  return,
              or just return for no comment.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-b'>
                    <explanation source='' xml:lang='en-us'>
                    use "path" for temp file
                    </explanation>
                    <help name='-b' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Use  the  specified  path  for  the  temporary  zip
              archive. For example:

                     zip -b /tmp stuff *

              will put the temporary zip archive in the directory
              /tmp, copying over stuff.zip to the current  direc-
              tory  when  done.  This  option is only useful when
              updating an existing archive, and the  file  system
              containing  this  old  archive does not have enough
              space to hold both old and new archives at the same
              time.
                    ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>path for temporary archive</message>
                  <action>_files -/</action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-@'>
                    <explanation source='' xml:lang='en-us'>
                    read names from stdin
                    </explanation>
                    <help name='-@' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Take the list of input files from  standard  input.
              Only one filename per line.
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-F'>
                    <explanation source='' xml:lang='en-us'>
                    fix zipfile
                    </explanation>
                    <help name='-F' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Fix the zip archive. This option  can  be  used  if
              some portions of the archive are missing. It is not
              guaranteed to work, so you MUST make  a  backup  of
              the original archive first.

              When  doubled  as in -FF the compressed sizes given
              inside the damaged archive are not trusted and  zip
              scans for special signatures to identify the limits
              between the archive members. The single -F is  more
              reliable  if  the  archive is not too much damaged,
              for example if it has only been truncated,  so  try
              this option first.

              Neither option will recover archives that have been
              incorrectly transferred in ascii  mode  instead  of
              binary.  After  the  repair, the -t option of unzip
              may show that some files have a bad CRC. Such files
              cannot  be  recovered; you can remove them from the
              archive using the -d option of zip.
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-FF'>
                    <explanation source='' xml:lang='en-us'>
                    try harder to fix zipfile
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-A'>
                    <explanation source='' xml:lang='en-us'>
                    adjust self-extracting exe
                    </explanation>
                    <help name='-A' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Adjust self-extracting executable archive.  A self-
              extracting   executable   archive   is  created  by
              prepending the SFX stub to an existing archive. The
              -A  option  tells  zip  to adjust the entry offsets
              stored in the archive to  take  into  account  this
              "preamble" data.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-T'>
                    <explanation source='' xml:lang='en-us'>
                    test zipfile integrity
                    </explanation>
                    <help name='-T' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Test the integrity of the  new  zip  file.  If  the
              check  fails,  the  old  zip  file is unchanged and
              (with the -m option) no input files are removed.
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-y'>
                    <explanation source='' xml:lang='en-us'>
                    store symbolic links as the link instead of the referenced file
                    </explanation>
                    <help name='-y' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Store  symbolic  links  as such in the zip archive,
              instead  of  compressing  and  storing   the   file
              referred to by the link (UNIX only).
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-e'>
                    <explanation source='' xml:lang='en-us'>
                    encrypt
                    </explanation>
                    <help name='-e' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Encrypt the contents of the  zip  archive  using  a
              password  which  is  entered  on  the  terminal  in
              response to a prompt (this will not be  echoed;  if
              standard  error is not a tty, zip will exit with an
              error).  The password prompt is  repeated  to  save
              the user from typing errors.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-h'>
                    <explanation source='' xml:lang='en-us'>
                    show help
                    </explanation>
                    <help name='-h' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Display the zip help information (this also appears
              if zip is run with no arguments).
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-u'>
                    <explanation source='' xml:lang='en-us'>
                    update: only changed or new files
                    </explanation>
                    <help name='-u' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Replace (update)  an  existing  entry  in  the  zip
              archive  only if it has been modified more recently
              than the version already in the zip  archive.   For
              example:

                     zip -u stuff *

              will  add  any  new files in the current directory,
              and update any files which have been modified since
              the zip archive stuff.zip was last created/modified
              (note that zip will not try to pack stuff.zip  into
              itself when you do this).

              Note that the -u option with no arguments acts like
              the -f (freshen) option.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-m'>
                    <explanation source='' xml:lang='en-us'>
                    move into zipfile (delete files)
                    </explanation>
                    <help name='-m' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Move the specified  files  into  the  zip  archive;
              actually, this deletes the target directories/files
              after making the specified zip archive. If a direc-
              tory  becomes empty after removal of the files, the
              directory is also removed. No  deletions  are  done
              until  zip  has  created the archive without error.
              This is useful for conserving disk  space,  but  is
              potentially  dangerous  so it is recommended to use
              it in combination  with  -T  to  test  the  archive
              before removing all input files.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-g'>
                    <explanation source='' xml:lang='en-us'>
                    allow growing existing zipfile
                    </explanation>
                    <help name='-g' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Grow (append to) the specified zip archive, instead
              of creating a new one. If this operation fails, zip
              attempts to restore the  archive  to  its  original
              state.  If the restoration fails, the archive might
              become  corrupted.  This  option  is  ignored  when
              there's  no  existing  archive or when at least one
              archive member must be updated or deleted.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-j'>
                    <explanation source='' xml:lang='en-us'>
                    junk: do not record directory names
                    </explanation>
                    <help name='-j' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Store  just  the  name  of  a  saved file (junk the
              path),  and  do  not  store  directory  names.   By
              default,  zip will store the full path (relative to
              the current path).
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-l'>
                    <explanation source='' xml:lang='en-us'>
                    convert LF to CR LF
                    </explanation>
                    <help name='-l' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Translate the Unix end-of-line  character  LF  into
              the  MSDOS convention CR LF. This option should not
              be used on binary files.  This option can  be  used
              on  Unix  if  the  zip file is intended for PKUNZIP
              under MSDOS. If the input files already contain  CR
              LF,  this option adds an extra CR. This ensure that
              unzip -a on Unix will get back an exact copy of the
              original file, to undo the effect of zip -l.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-ll'>
                    <explanation source='' xml:lang='en-us'>
                    convert CR LF to LF
                    </explanation>
                    <help name='-ll' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Translate the MSDOS end-of-line CR LF into Unix LF.
              This option should not be  used  on  binary  files.
              This option can be used on MSDOS if the zip file is
              intended for unzip under Unix.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-L'>
                    <explanation source='' xml:lang='en-us'>
                    display license
                    </explanation>
                    <help name='-L' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Display the zip license.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-v'>
                    <explanation source='' xml:lang='en-us'>
                    verbose operation/print version info
                    </explanation>
                    <help name='-v' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Verbose mode or print diagnostic version info.

              Normally, when applied  to  real  operations,  this
              option  enables the display of a progress indicator
              during compression and requests verbose  diagnostic
              info about zipfile structure oddities.

              When -v is the only command line argument, and std-
              out is not  redirected  to  a  file,  a  diagnostic
              screen  is  printed. In addition to the help screen
              header with  program  name,  version,  and  release
              date,  some  pointers to the Info-ZIP home and dis-
              tribution sites are given. Then, it shows  informa-
              tion  about  the  target environment (compiler type
              and version, OS version, compilation date  and  the
              enabled  optional  features  used to create the zip
              executable.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-z'>
                    <explanation source='' xml:lang='en-us'>
                    add zipfile comment
                    </explanation>
                    <help name='-z' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Prompt  for a multi-line comment for the entire zip
              archive.  The comment is ended by a line containing
              just  a  period, or an end of file condition (^D on
              UNIX, ^Z on MSDOS, OS/2, and VAX/VMS).  The comment
              can be taken from a file:

                     zip -z foo < foowhat
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-t'>
                    <explanation source='' xml:lang='en-us'>
                    only do files after or at "mmddyyyy"
                    </explanation>
                    <help name='-t' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Do not operate  on  files  modified  prior  to  the
              specified date, where mm is the month (0-12), dd is
              the day of the month (1-31), and yyyy is the  year.
              The   ISO  8601  date  format  yyyy-mm-dd  is  also
              accepted.  For example:

                     zip -rt 12071991 infamy foo

                     zip -rt 1991-12-07 infamy foo

              will add all the files in foo and  its  subdirecto-
              ries that were last modified on or after 7 December
              1991, to the zip archive infamy.zip.
                    ]]></help>

                  </flagarg>
                </optspec>
                <description>
                  <message>mmddyyyy</message>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-tt'>
                    <explanation source='' xml:lang='en-us'>
                    only do files before "mmddyyyy"
                    </explanation>
                    <help name='-tt' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Do not operate on files modified after  or  at  the
              specified date, where mm is the month (0-12), dd is
              the day of the month (1-31), and yyyy is the  year.
              The   ISO  8601  date  format  yyyy-mm-dd  is  also
              accepted.  For example:

                     zip -rtt 11301995 infamy foo

                     zip -rtt 1995-11-30 infamy foo

              will add all the files in foo and  its  subdirecto-
              ries that were last modified before the 30 November
              1995, to the zip archive infamy.zip.
                    ]]></help>
                  </flagarg>
                </optspec>
                <description>
                  <message>mmddyyyy</message>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-o'>
                    <explanation source='' xml:lang='en-us'>
                    make zipfile as old as latest entry
                    </explanation>
                    <help name='-o' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Set the "last modified" time of the zip archive  to
              the  latest  (oldest)  "last  modified"  time found
              among the entries in the zip archive.  This can  be
              used without any other operations, if desired.  For
              example:

              zip -o foo

              will change the last modified time  of  foo.zip  to
              the latest time of the entries in foo.zip.
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-D'>
                    <explanation source='' xml:lang='en-us'>
                    do not add directory entries
                    </explanation>
                    <help name='-D' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Do not create entries in the zip archive for direc-
              tories.  Directory entries are created  by  default
              so  that  their  attributes can be saved in the zip
              archive.  The environment variable  ZIPOPT  can  be
              used  to  change  the  default options. For example
              under Unix with sh:

                     ZIPOPT="-D"; export ZIPOPT

              (The variable ZIPOPT can be  used  for  any  option
              except  -i and -x and can include several options.)
              The option -D is a shorthand for -x  "*/"  but  the
              latter cannot be set as default in the ZIPOPT envi-
              ronment variable.
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-J'>
                    <explanation source='' xml:lang='en-us'>
                    junk zip file prefix (unzipsfx)
                    </explanation>
                    <help name='-J' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Strip any prepended data (e.g. a SFX stub) from the
              archive.
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-X'>
                    <explanation source='' xml:lang='en-us'>
                    eXclude eXtra file attributes
                    </explanation>
                    <help name='-X' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Do   not   save  extra  file  attributes  (Extended
              Attributes on  OS/2,  uid/gid  and  file  times  on
              Unix).
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-n'>
                    <explanation source='' xml:lang='en-us'>
                    specify suffixes of files not to be compressed
                    </explanation>
                    <help name='-n' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
          suffixes
              Do  not  attempt  to  compress files named with the
              given suffixes.  Such files are simply  stored  (0%
              compression)  in  the  output zip file, so that zip
              doesn't waste its time  trying  to  compress  them.
              The  suffixes  are  separated  by  either colons or
              semicolons.  For example:

                     zip -rn .Z:.zip:.tiff:.gif:.snd  foo foo

              will copy everything from  foo  into  foo.zip,  but
              will  store  any files that end in .Z, .zip, .tiff,
              .gif, or  .snd  without  trying  to  compress  them
              (image  and  sound  files often have their own spe-
              cialized compression  methods).   By  default,  zip
              does not compress files with extensions in the list
              .Z:.zip:.zoo:.arc:.lzh:.arj.  Such files are stored
              directly  in  the  output archive.  The environment
              variable ZIPOPT can be used to change  the  default
              options. For example under Unix with csh:

                     setenv ZIPOPT "-n .gif:.zip"

              To attempt compression on all files, use:

                     zip -n : foo

              The  maximum  compression  option  -9 also attempts
              compression on all files regardless of extension.

              On Acorn RISC OS systems the suffixes are  actually
              filetypes  (3  hex  digit  format). By default, zip
              does not compress files with filetypes in the  list
              DDC:D96:68E  (i.e.  Archives, CFS files and PackDir
              files).
                    ]]></help>

                  </flagarg>
                </optspec>
                <description>
                  <message>suffixes</message>
                  <action>->suffixes</action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-0'>
                    <explanation source='' xml:lang='en-us'>
                    store only
                    </explanation>
                    <help name='-0' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Regulate  the speed of compression using the speci-
              fied digit #, where  -0  indicates  no  compression
              (store  all  files),  -1 indicates the fastest com-
              pression method (less compression) and -9 indicates
              the  slowest  compression  method (optimal compres-
              sion, ignores the suffix list).  The  default  com-
              pression level is -6.
                    ]]></help>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-1'>
                    <explanation source='' xml:lang='en-us'>
                    compress faster
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-2'/>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-3'/>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-4'/>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-5'/>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-6'/>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-7'/>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <flagarg name='-8'/>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                  </exclusionlist>
                  <flagarg name='-9'>
                    <explanation source='' xml:lang='en-us'>
                    compress better
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-x'>
                    <explanation source='' xml:lang='en-us'>
                    exclude the following names
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-i'>
                    <explanation source='' xml:lang='en-us'>
                    include only the following names
                    </explanation>
                    <help name='-i' source='manpage' xml:lang='en'
                          format='preformattedtext'><![CDATA[
              Include only the specified files, as in:

                     zip -r foo . -i \*.c

              which will include only the files that end in .c in
              the current directory and its subdirectories. (Note
              for PKZIP users: the equivalent command is

                     pkzip -rP foo *.c

              PKZIP does not allow recursion in directories other
              than the current one.)  The  backslash  avoids  the
              shell  filename  substitution,  so  that  the  name
              matching is performed by zip at all directory  lev-
              els.

              Also possible:

                     zip -r foo  . -i@xxxxxxxxxxx

              which  will  only  include the files in the current
              directory and its  subdirectories  that  match  the
              patterns in the file include.lst.
                    ]]></help>

                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-f</flag>
                    <flag>-d</flag>
                    <flag>-R</flag>
                    <flag>-q</flag>
                    <flag>-c</flag>
                    <flag>-b</flag>
                    <flag>-@</flag>
                    <flag>-F</flag>
                    <flag>-FF</flag>
                    <flag>-A</flag>
                    <flag>-T</flag>
                    <flag>-y</flag>
                    <flag>-e</flag>
                    <flag>-h</flag>
                    <flag>-u</flag>
                    <flag>-m</flag>
                    <flag>-g</flag>
                    <flag>-j</flag>
                    <flag>-l</flag>
                    <flag>-ll</flag>
                    <flag>-L</flag>
                    <flag>-v</flag>
                    <flag>-z</flag>
                    <flag>-t</flag>
                    <flag>-tt</flag>
                    <flag>-o</flag>
                    <flag>-D</flag>
                    <flag>-J</flag>
                    <flag>-X</flag>
                    <flag>-n</flag>
                    <flag>-0</flag>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-3</flag>
                    <flag>-4</flag>
                    <flag>-5</flag>
                    <flag>-6</flag>
                    <flag>-7</flag>
                    <flag>-8</flag>
                    <flag>-9</flag>
                  </exclusionlist>
                  <nextposition/>
                </optspec>
                <description>
                  <message>zip file</message>
                  <action>_files -g '(#i)*.(zip|[jw]ar)'</action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <nextposition/>
                </optspec>
                <description>
                  <message>file</message>
                  <action>->files</action>
                </description>
              </argspec>
            </argspecs>
            <code samecommand="true">
                &amp;&amp; return 0
            </code>
        </service>
        <service name='unzip'>
            <arguments>
                <argoption>
                  <name>C</name>
                </argoption>
                <argoption>
                  <name>s</name>
                </argoption>
            </arguments>
            <argspecs>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-f</flag>
                    <flag>-u</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                    <flag>-d</flag>
                  </exclusionlist>
                  <flagarg name='-p'>
                    <explanation source='' xml:lang='en-us'>
                    extract files to pipe
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-u</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-f'>
                    <explanation source='' xml:lang='en-us'>
                    freshen existing files; create none
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-f</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-u'>
                    <explanation source='' xml:lang='en-us'>
                    update files; create if necessary
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-f</flag>
                    <flag>-u</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                    <flag>-d</flag>
                  </exclusionlist>
                  <flagarg name='-l'>
                    <explanation source='' xml:lang='en-us'>
                    list files
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-f</flag>
                    <flag>-u</flag>
                    <flag>-l</flag>
                    <flag>-z</flag>
                    <flag>-d</flag>
                  </exclusionlist>
                  <flagarg name='-t'>
                    <explanation source='' xml:lang='en-us'>
                    test compressed archive data
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-f</flag>
                    <flag>-u</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-d</flag>
                  </exclusionlist>
                  <flagarg name='-z'>
                    <explanation source='' xml:lang='en-us'>
                    display archive comment
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-d+'>
                    <explanation source='' xml:lang='en-us'>
                    specify directory to extract files to
                    </explanation>
                  </flagarg>
                </optspec>
                <description>
                  <message>directory</message>
                  <action>_files -/</action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                    <flag>-o</flag>
                  </exclusionlist>
                  <flagarg name='-n'>
                    <explanation source='' xml:lang='en-us'>
                    never overwrite existing files
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                    <flag>-n</flag>
                  </exclusionlist>
                  <flagarg name='-o'>
                    <explanation source='' xml:lang='en-us'>
                    overwrite files without prompting
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-j'>
                    <explanation source='' xml:lang='en-us'>
                    junk paths (don't make directories)
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-C'>
                    <explanation source='' xml:lang='en-us'>
                    match filenames case-insensitively
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-X'>
                    <explanation source='' xml:lang='en-us'>
                    restore UID/GID info
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-q'>
                    <explanation source='' xml:lang='en-us'>
                    quiet
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-qq'>
                    <explanation source='' xml:lang='en-us'>
                    quieter
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-a'>
                    <explanation source='' xml:lang='en-us'>
                    auto-convert any text files
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-aa'>
                    <explanation source='' xml:lang='en-us'>
                    treat all files as text
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-v'>
                    <explanation source='' xml:lang='en-us'>
                    verbose/display version info
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-L'>
                    <explanation source='' xml:lang='en-us'>
                    lowercase (some) filenames
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-M'>
                    <explanation source='' xml:lang='en-us'>
                    page output
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-x'>
                    <explanation source='' xml:lang='en-us'>
                    exclude the following names
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-p</flag>
                    <flag>-f</flag>
                    <flag>-u</flag>
                    <flag>-l</flag>
                    <flag>-t</flag>
                    <flag>-z</flag>
                    <flag>-n</flag>
                    <flag>-o</flag>
                    <flag>-j</flag>
                    <flag>-C</flag>
                    <flag>-X</flag>
                    <flag>-q</flag>
                    <flag>-qq</flag>
                    <flag>-a</flag>
                    <flag>-aa</flag>
                    <flag>-v</flag>
                    <flag>-L</flag>
                    <flag>-M</flag>
                  </exclusionlist>
                  <position position='1'/>
                </optspec>
                <description>
                  <message>zip file</message>
                  <action>_files -g '(#i)*.(zip|[jw]ar)'</action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <anyposition/>
                </optspec>
                <description>
                  <message>file</message>
                  <action>->files</action>
                </description>
              </argspec>
            </argspecs>
            <code samecommand="true">
                &amp;&amp; return 0
            </code>
        </service>
        <service name='zipinfo'>
            <arguments>
                <argoption>
                  <name>C</name>
                </argoption>
                <argoption>
                  <name>s</name>
                </argoption>
            </arguments>
            <argspecs>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-2</flag>
                    <flag>-s</flag>
                    <flag>-m</flag>
                    <flag>-l</flag>
                    <flag>-v</flag>
                    <flag>-h</flag>
                    <flag>-t</flag>
                    <flag>-T</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-1'>
                    <explanation source='' xml:lang='en-us'>
                    filenames only
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-s</flag>
                    <flag>-m</flag>
                    <flag>-l</flag>
                    <flag>-v</flag>
                    <flag>-T</flag>
                  </exclusionlist>
                  <flagarg name='-2'>
                    <explanation source='' xml:lang='en-us'>
                    just filenames but allow -h/-t/-z
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-m</flag>
                    <flag>-l</flag>
                    <flag>-v</flag>
                    <flag>-h</flag>
                    <flag>-t</flag>
                  </exclusionlist>
                  <flagarg name='-s'>
                    <explanation source='' xml:lang='en-us'>
                    short format
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-s</flag>
                    <flag>-l</flag>
                    <flag>-v</flag>
                    <flag>-h</flag>
                    <flag>-t</flag>
                  </exclusionlist>
                  <flagarg name='-m'>
                    <explanation source='' xml:lang='en-us'>
                    medium format
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-s</flag>
                    <flag>-m</flag>
                    <flag>-v</flag>
                    <flag>-h</flag>
                    <flag>-t</flag>
                  </exclusionlist>
                  <flagarg name='-l'>
                    <explanation source='' xml:lang='en-us'>
                    long format
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-s</flag>
                    <flag>-m</flag>
                    <flag>-l</flag>
                    <flag>-h</flag>
                    <flag>-z</flag>
                  </exclusionlist>
                  <flagarg name='-v'>
                    <explanation source='' xml:lang='en-us'>
                    verbose, multi-page format
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-s</flag>
                    <flag>-m</flag>
                    <flag>-l</flag>
                    <flag>-v</flag>
                  </exclusionlist>
                  <flagarg name='-h'>
                    <explanation source='' xml:lang='en-us'>
                    print header line
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-v</flag>
                  </exclusionlist>
                  <flagarg name='-z'>
                    <explanation source='' xml:lang='en-us'>
                    print zipfile comment
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-C'>
                    <explanation source='' xml:lang='en-us'>
                    match filenames case-insensitively
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-s</flag>
                    <flag>-m</flag>
                    <flag>-l</flag>
                  </exclusionlist>
                  <flagarg name='-t'>
                    <explanation source='' xml:lang='en-us'>
                    print totals
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-2</flag>
                  </exclusionlist>
                  <flagarg name='-T'>
                    <explanation source='' xml:lang='en-us'>
                    use sortable decimal format for file times
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-M'>
                    <explanation source='' xml:lang='en-us'>
                    page output
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <flagarg name='-x'>
                    <explanation source='' xml:lang='en-us'>
                    exclude the following names
                    </explanation>
                  </flagarg>
                </optspec>
              </argspec>
              <argspec>
                <optspec>
                  <exclusionlist>
                    <flag>-1</flag>
                    <flag>-2</flag>
                    <flag>-s</flag>
                    <flag>-m</flag>
                    <flag>-l</flag>
                    <flag>-v</flag>
                    <flag>-h</flag>
                    <flag>-z</flag>
                    <flag>-C</flag>
                    <flag>-t</flag>
                    <flag>-T</flag>
                    <flag>-M</flag>
                  </exclusionlist>
                  <position position='1'/>
                </optspec>
                <description>
                  <message>zip file</message>
                  <action>_files -g '(#i)*.(zip|[jw]ar)'</action>
                </description>
              </argspec>
              <argspec>
                <optspec>
                  <anyposition/>
                </optspec>
                <description>
                  <message>file</message>
                  <action>->files</action>
                </description>
              </argspec>
            </argspecs>
            <code samecommand="true">
                &amp;&amp; return 0
            </code>
        </service>
    </services>
    <states>
        <state>
            <name>suffixes</name>
            <code><![CDATA[
    compset -P '*:'
    compset -S ':*' || suf=":."
    suffixes=( *.*(N:e) )
    _wanted suffixes expl suffixes \
        compadd -S "$suf" -r ": \t" .$^suffixes && return 0
        ]]></code>
        </state>
        <state>
            <name>files</name>
            <code><![CDATA[
    if [[ $service = zip ]] && (( ! ${+opt_args[-d]} )); then
      _files -g '^(#i)*.(zip|[jw]ar)' && return 0
    else
      (( izip = 1 + words[(I)-[^xi]*] ))
      (( izip == 1 )) && (( izip++ ))
      zipfile=( $~words[izip](|.zip|.ZIP) )
      [[ -z $zipfile[1] ]] && return 1
      if [[ $zipfile[1] !=  $_zip_cache_list ]]; then
        _zip_cache_name="$zipfile[1]"
        _zip_cache_list=( ${(f)"$(zipinfo -1 $_zip_cache_name)"} )
      fi
     _wanted files expl 'file from archive' \
         _multi_parts / _zip_cache_list && return 0
    fi
            ]]></code>
        </state>
    </states>
</completion>


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