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

Re: Zsh completion configuration LISTMAX

On Feb 26,  3:20am, joe M wrote:
} I am trying to figure out how to limit the number of entries shown in
} a list by the completer. I exported LISTMAX=50 and I can see it in the
} shell with "echo $LISTMAX".
} But, for some reason, the lists are a lot bigger than that.

All that LISTMAX controls is whether zsh asks something like

zsh: do you wish to see all 2673 possibilities (1272 lines)? 

before it displays the listing.  It has nothing to do with the size of
the list once it is displayed, and if you have menu-selection enabled
(so that the list can be scrolled/navigated) then LISTMAX is ignored.

If you actually want to eliminate some of the possible matches so that
the list itself is shorter, you either need to reduce the number of
words passed to compadd [difficult in general but possibly doable in
a custom function like the _history_or_autocd example] or play with the
tag-order / group-order styles to limit the sets of matches displayed.

Others may have additional suggestions ...

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