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

Re: PATCH: completion of dates



Bart wrote:
> It would be nice if this only kicked in when menu-selection is active.
> I know that may not be possible, but the strange ordering of the matches
> is going to be baffling when only doing regular menu completion.

Looking for select in $_def_menu_style looks like it might do that but
I'm not exactly sure.

> If one menu-selects "before" or "since" and then immediately re-enters
> menu selection to choose the number of days, the +/- is removed from
> the line and you return to completing exact dates (with "sense" group
> available as before).  [note 1]  The only way to actually complete a
> before/since date is to type the +/- as a literal before entering the
> menu-selection, at which point the "sense" group disappears, or to
> begin normal completion after selecting before/since and then drop
> into menu-select from there.

I can't reproduce this problem at all. Even from zsh -f, it works for
me. So either I've misunderstood your steps or there's something in your
setup that it isn't allowing for. I'm assuming:
  zsh -f
  autoload -U compinit;compinit
  zstyle ':completion*:default' menu 'select=0'
  find . -mtime <tab>
    <select "before"><enter (accept-line)><tab again>
That leaves the + on the command-line and resumes menu selection
without the "senses".

If you use a binding such as the following when selecting before/since,
does it work?
  bindkey -M menuselect "/" accept-and-infer-next-history

Thanks

Oliver



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