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

RE: Passsing descriptions down in completion functions



> 
> The general question - should completion functions ever accept (be used
> with) other options than compadd? If not the above is perfectly valid and
> probably more simple that modifying every single function. If yes, here is
> the list of functions that use _wanted without '-'.
> 

Well, I started to look into these functions and immediately hit some
problems:

AIX/Type/_object_classes:

_wanted objectclasses expl 'object class' \
   _files -W ${ODMDIR:-/etc/objrepos} -g '^*.vc'

Here is just no place where I could stuff the magic "-". Granted, this one
does not pass arguments it receives but in general I do not see why it
should not do it.

Base/Utility/_sub_commands

if [[ CURRENT -eq 2 ]]; then
  _wanted commands expl command compadd "$@"
else
  _message 'no more arguments'
fi

almost the same problem. In this case arguments contain both description and
matches so I have no way to stuff "-" in between.

-andrey



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