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

Re: Completion alias



=?UTF-8?Q?J=C3=B6rg?= Sommer wrote:
> is it possible to tell the completion system, that two commands are the
> same? mutt and mutt-ng take the same arguments, but the completion for
> mutt-ng arguments is not enabled.

compdef mutt-ng=mutt

This is documented a bit obscurely (in the description of compdef in
zshcompsys.1):

     Alternatively, all the arguments may have the form `CMD=SERVICE'.
     Here SERVICE should already have been defined by `CMD1=SERVICE'
     lines in #compdef files, as described above.  The argument for CMD
     will be completed in the same way as SERVICE.

Actually, it doesn't matter how the "service" was defined, it just has
to be registered as a completion, so the "CMD1=SERVICE" is a bit
of a red herring, unless I'm missing something.

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



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