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

Re: Minor bugs in _unsetopt and _main_complete ?



[I had thought that someone else would respond to this message, but
since no one did, let me give you a late reply.]

On Fri, Dec 10, 2004 at 11:25:53AM +0900, ?$B9a@n ?$BOK wrote:
> In _unsetopt, "_options_set || _options" should be,
> 
> _options_unset || _options
> 
> and in _main_complete,
> 
> _options_set=(${(k)options[(R)on]})
> _options_unset=(${(k)options[(R)off]})
> 
> should be,
> 
> _options_set=(${(k)options[(R)off]})
> _options_unset=(${(k)options[(R)on]})

You seem to be thinking about the variables in the opposite manner in
which they were intended.  The _options_set variable contains set
options (not options that can be set), so it is used to complete
unsettable options in _unsetopt.  I think this interpretation of the
options is evident in this comment in _main_complete:

    # If you want to complete only set or unset options for the unsetopt
    # and setopt builtin, un-comment these lines:

This is followed by _options_set (the set options) and _options_unset
(the unset options).  Certainly, your choice to reverse the meaning in
both the setting and use of these variables will work fine for your
configuration, but I think the CVS version should remain unchanged.

..wayne..



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