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

Re: PATCH: Make _xset complete more helpfully



On May 12, 10:14am, Bart Schaefer wrote:
}
}      27 [[ "$_type$_noprefix" = options && ! -prefix [-+]* ]] && \
}      28     zstyle -T ":completion:${curcontext}:options" prefix-needed &&
}      29         return 1
} 
} I'm not sure it's correct for it to entirely punt when prefix-needed
} is not defined.  Probably the right thing would be to assume a default
} value instead ... but I don't really know.

Ah.  Seems punting when not defined is equivalent to assuming a default
value of "true":

     For command options, this means that the initial `-', `+', or `--'
     must be typed explicitly before option names will be completed.

So changing _xset to use -O instead *is* the correct fix.



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