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

Re: short option and long option completion formatting



On Feb 11, 10:58pm, Eric Mangold wrote:
}
} I want a way to combine these specs so as not to duplicate "code" and a 
} way to format this all on one line, such as:
} 
} -a        -- A description
} -b, --bar -- Description of bar
} -f, --foo -- Description of foo
}      --baz -- baz description

This is done automatically for options with identical descriptions, as
of zsh 4.1.something (I forget exactly when).  E.g. note -H and -v in
the cvs completion below:

schaefer<501> cvs -
Completing option
--allow-root         -- allowable root for pserver                             
--help           -H  -- print help information                                 
--help-commands      -- command help                                           
--help-options       -- global options help                                    
--help-synonyms      -- command synonyms help                                  
--version        -v  -- print version and copyright information                
(more trimmed)

So I'd say you should leave your completion function as it is, and consider
upgrading your zsh installation if you're desperate to have this.



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