Zsh Mailing List Archive
Messages sorted by:
Re: exposing completions data to user
- X-seq: zsh-workers 39675
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: exposing completions data to user
- Date: Tue, 18 Oct 2016 07:50:06 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=mSG6hslgwdLPi29hTvxYR4Qp/1HWKP8+6rn9+Ri1f1U=; b=sj6oc2NahiCb8AwGC06rqdwrEN0TOb0vpx6TgGOU1lMAIXQw6Jg35xRXHOcA+wm7Ur Enay+x4SMB/jUZ3Ryk80daHMtb0dZ6ZFltp5iC+v8PpzlmhC+6Cv5mgS/iYSVzPVt1rC I+sN8jLiSQKVI0UbQUTeBbRhEINp5nJ6CvVAqQclimDSHnrhd7jVrpR5e5abCzXV9Hny MZXIftk7XmZbgSlotBtZSB/UZVd3yreOgPb0qMennmYxLex8cK+kjlCGwIU/eL6bLRJI ztQUtEwNxC9bogYTEWtzRj2Tar0222HiVoKKfnw/B6QPCNQuZMeZYi5s3EFBnqGgQno7 FsrQ==
- In-reply-to: <firstname.lastname@example.org>
- 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>
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.
Messages sorted by: