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

Re: Completion and command versions

Doug Kearns wrote:
> Is there a policy regarding the command version that completion
> functions should support? What about commands where there are
> significant changes between versions?

The standard way is using the _pick_variant function.

If it's too dangerous to run the command to find out what it does, you
probably need a style.  `variant' is already use by _pick_variant,
unfortunately --- it's not a very good name, since it doesn't give the
variant, it gives the programme to run to pick the variant.  Of course
it could be set to a function that simply returns the type, but that
method doesn't have a sensible default.

Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070

The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
If you received this in error, please contact the sender and 
delete the material from any computer.

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