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

Re: How to tweak the format of file-list completion?

On Sun, Dec 20, 2020 at 1:41 PM Andy Spiegl <zsh.Andy@xxxxxxxxx> wrote:
> I really like the long format in menu selection/completion and init it like this:
>  zstyle ':completion:*' file-list list=20 insert=10
> But I'm unhappy with the format of the completion info.

For the nonce you will have to copy Completion/Unix/Type/_list_files
into an earlier slot in your $fpath and edit the format string that is
passed to "zstat" at line 61 or thereabouts (may vary depending on
your version of zsh).

A more complete update would be to permit that format to be assigned
in a zstyle.  The question is whether to do it like

zstyle ':completion:*' \
  file-list list=20 insert=10 format="%b %e %H:%M"

(in which case a format= with no other values would be equivalent to
also asserting "all") or to add a new token ala

zstyle ':completion:*' \
  file-list-format "%b %e %H:%M"

(which has some precedent with "date-format"), or to us some new tag
with the "format" style (though I don't know what tag that would be,

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