Zsh Mailing List Archive
Messages sorted by:
Re: exposing completions data to user
- X-seq: zsh-workers 39722
- From: "Ben Veal" <benveal92@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: exposing completions data to user
- Date: Tue, 25 Oct 2016 05:16:36 +0100
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=z1y0x55qQrO/SuQL2QEGfNslmuOpMhhRMOoMG2p8cvU=; b=SXHA7TIlk9kvzhrXCPGrzarcRZPiFR3G+rBMq5/woTkTIsoQB38nxbiIyu43boUHIN m2JGJSDvSAK5P+9XhrcGBSzh4zcL+Tql3BnaA1p7bEIMQaUN4P1xmQR0vLMqLZSNC245 0ga3FMIFHRbB/TrRYKni4LqqYtQhfjsAyq3OcD69rVYwAlfC04gNs7aXNUIsvScYb8gI KgKc7AzhPnYHuOvfVXE0pAqPJgjCDUYcWFvvEWciV0JPXo/hy31QKyT7AEQof4Nci7t4 6iVRo1RgLtwNCCJ07pWaLObRzUilZMzcbmOmRnO9NB7ZEYkbeKnqreEMyOhdBECSigwT aBew==
- In-reply-to: <161018075006.ZM25400@torch.brasslantern.com> (Bart Schaefer's message of "Tue, 18 Oct 2016 07:50:06 -0700")
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <email@example.com> <161018075006.ZM25400@torch.brasslantern.com>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> On Oct 18, 1:06am, Ben Veal wrote:
> } To do this I need access to the list of possible
> } completions and their descriptions.
> } As far as I can determine, this information is not
> } normally available
> This is what the -O -A and -D options of the compadd builtin are meant
> to accomplish. Are you capturing completions for a specific context
> for which you are writing the completion function, or are you trying
> generically to capture the strings that any completion would normally
> display via ZLE?
> If the former you should be able to structure your own compadd calls
> appropriately. If the latter you might be able to get away with a
> wrapper around "builtin compadd ..." that changes the arguments; see
> for example what _approximate does.
> } and so I need to write a module
> } which exposes this data.
> If you determine that you do need to go this way, looking at the
> imlementation of the above compadd options is probably your best bet.
Yes, I want to get the completions and their
descriptions generically so that I can use zaw as an
alternative method for performing completions.
After poking around the source code some more it seems
that amatches[i]->matches[j]->str should contain the
completions (for different values of i and j). However
when I try exploring that datastructure at breakpoints
in the printlist, ilistmatches, and complistmatches
functions gdb tells me: "Cannot access memory at address 0x0"
I get the same message when I try pmatches.
Any more advice?
Messages sorted by: