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

Re: PATCH: completion of dates



On Jul 7,  5:32pm, Oliver Kiddle wrote:
} Subject: PATCH: completion of dates
}
} As far as I know, dummy matches are only used in _describe, _values and
} _arguments to put matches with a common description together. I wanted
} to experiment with it and came up with this. What it does is completion
} of days laid out in the form of a calendar. Perhaps a bit of a gimmick
} but I think it might be useful, especially in cases where a date is
} specified in an obscure way such as for find's -mtime option.

This is entertaining and probably quite useful; a few remarks:

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.

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.

[1] Also in this state there's a space appended at the end of the word
on the command line during the menu selection.  Probably an issue with
menu-selection in general rather than this in particular.  In fact
both behaviors may be specific to re-entering menu-select without
going through normal completion at least once in between.



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