zsh-users
 help / color / mirror / code / Atom feed
* modify compadd-ed values
@ 2019-06-26 22:48 Pier Paolo Grassi
  2019-06-27  5:47 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Pier Paolo Grassi @ 2019-06-26 22:48 UTC (permalink / raw)
  To: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

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

thanks in advance

Pier Paolo Grassi
linkedin: https://www.linkedin.com/in/pier-paolo-grassi-19300217
founder: https://www.meetup.com/it-IT/Machine-Learning-TO

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: modify compadd-ed values
  2019-06-26 22:48 modify compadd-ed values Pier Paolo Grassi
@ 2019-06-27  5:47 ` Bart Schaefer
  2019-06-27  6:42   ` Pier Paolo Grassi
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2019-06-27  5:47 UTC (permalink / raw)
  To: Pier Paolo Grassi; +Cc: Zsh-Users List

On Wed, Jun 26, 2019 at 3:50 PM Pier Paolo Grassi <pierpaolog@gmail.com> 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.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: modify compadd-ed values
  2019-06-27  5:47 ` Bart Schaefer
@ 2019-06-27  6:42   ` Pier Paolo Grassi
  0 siblings, 0 replies; 3+ messages in thread
From: Pier Paolo Grassi @ 2019-06-27  6:42 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh-Users List

[-- Attachment #1: Type: text/plain, Size: 820 bytes --]

Awesome, thanks!

Il giorno gio 27 giu 2019 alle 07:48 Bart Schaefer <
schaefer@brasslantern.com> ha scritto:

> On Wed, Jun 26, 2019 at 3:50 PM Pier Paolo Grassi <pierpaolog@gmail.com>
> 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.
>
-- 
Pier Paolo Grassi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-27  6:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 22:48 modify compadd-ed values Pier Paolo Grassi
2019-06-27  5:47 ` Bart Schaefer
2019-06-27  6:42   ` Pier Paolo Grassi

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).