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

Re: info completion doesn't offer index entries any longer



On 1 Aug, Stephane Chazelas wrote:
> 2021-08-01 17:05:47 +0100, Stephane Chazelas:
> [...]
> > but even after that fixed (which causes the completion to be
> > very slow on my system as

That fix is needed. It looks like _call_program got added in without
further testing (or a cache obscured the breakage in testing). Feel free
to push the fix you described to the git repo.

> > 
> > $ info -k '' | wc
> > 47919  267467 2341131

You clearly have vastly more on your system than I have. I would guess
that among that extra output is an entry or entries that need additional
quoting or something and are breaking _describe - colons perhaps.

> > That still doesn't give me index entries. Same with

There is no actual attempt to complete anything for --index-search=
What do you think we should do there?

> Actually, (once fixed) it does seem to work as intended in that
> it only uses the output of "info -k ''" to build a list of info
> nodes that are referenced in index entries, not the index
> entries themselves.
>
> That seems to be redundant with the parsing of info -o- that the
> completer does otherwise to retrieve the list of nodes (and
> which is much faster as it only covers the one manual the user
> is querying completion for).

I think that method only retrieves the menu for the top level of the
manual. It makes more difference with some documentation than others.

> Evidence of that is that fixing that "info -k" to intended "info
> -k ''" doesn't seem to change much if at all the behaviour (but
> makes the completion significantly slower).
>
> Also, caching doesn't seem to work properly as "info -k ''"
> seems to be invoked every time.

It does appear to work in my testing. Does the cache variable get set in
your case? Again, I suspect something peculiar to the longer info -k ''
output on your system is causing issues for the basic nested parameter
expansion that parses the output.

Oliver




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