zaw as completion widget?
vapniks opened this issue · 3 comments
Would be great to be able to use zaw as a completion widget for commands with loads of options like gpg for example. I did a bit of research on this some time ago but couldn't figure out how to do it.
If anyone has any ideas about the best way to accomplish this, let us know in the comments below.
zaw is based on zle, which is distinct feature from completion-widget. In my understanding, what we can do is to write a source which can be used both zaw and completion-widget, but it will be out of the scope of zaw.
It should be possible to write a zsh module (in c) which exports the completions in a parameter which could then be accessed by a zaw plugin. I made a start on this some time ago, but got caught up with other things and didn't complete it. If anyone wants to give it a shot here is the repo: https://github.com/vapniks/zsh-export-completions
It looks interesting!
It should be possible to write a zsh module (in c) which exports the completions in a parameter which could then be accessed by a zaw plugin.
I've never try it, and your understanding will be better than mine.
I keep opening this issue to track related works.