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

Re: compctl -y problem.

In reply to "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
>(Part of this thread went to zsh-workers ... returning now to zsh-users
>with a workaround)
>On May 25,  3:11pm, Bart Schaefer wrote:
>} I know Sven won't be thrilled about being asked to fix anything in the
>} old compctl code ... perhaps we should just remove the `-y' option, as
>} it's new since 3.0 anyway, and document the correct way to achieve the
>} same effect by using the new completion system (which, incidentally, I
>} don't know how to do ... `compadd -d' doesn't quite cut it).
>I don't know what the output of `aereport changes` looks like, so it may
>be that there's a simpler solution.  For example, if the same number of
>lines will be returned by `aereport changes -unf` and `... -terse`, this
>will work:
>function _aecd {
>  local change_descriptions reply
>  change_descriptions=(${(f)"$(aereport changes -unf | grep -v completed)"})
>  reply=($(aereport changes -terse | grep -v completed | sed -e 's/ .*$//'))
>  compadd -ld change_descriptions -a reply
>  compstate[list]='list force'

This one works perfectly.


Cesar Augusto Rorato Crusius                   o      _     _         _
Stanford University                   __o     /\_   _ \\o  (_)\__/o  (_)
e-mail:crusius@xxxxxxxxxxxxxxxxxxx  _`\<,    _>(_) (_)/<_    \_| \   _|/' \/
www.stanford.edu/~crusius          (_)/(_)  (_)        (_)   (_)    (_)'  _\o_

He who sacrifices functionality for ease of use
Loses both and deserves neither

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