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

Re: modify compadd-ed values



On Wed, Jun 26, 2019 at 3:50 PM Pier Paolo Grassi <pierpaolog@xxxxxxxxx> wrote:
>
> Hello, can someone help me to understand if and how i can modify completion
> results already added through compadd? I would like to use the _files
> completer to generate results and then add a custom description to each

Look at Completion/Base/Completer/_approximate -- it replaces compadd
with a wrapper function that it then removes again when done.

You would want to do the same sort of trick, except that your wrapper
will insert "-O results_array" in its argument list when calling
"builtin compadd".  You can then examine the $results_array after
calling _files.



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