Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: completion of dates
- X-seq: zsh-workers 35766
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- Subject: Re: PATCH: completion of dates
- Date: Fri, 10 Jul 2015 18:22:59 +0000
- Cc: Zsh workers <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=M1+DszzbpIZgbbAxVTsi3Ok2VY4=; b=SBaz7D W938M0SCaWq2Ab3IGxEvkUbLwmNuU+XfCHDOY8WZJraL3fQFjuMRaBmZ+KdRDbwL eHHn5nrlEA9Thu1E4GXnZqjUQBKCz9YoPpekHReYhhBvBY9zUpxBEr4YBHOAuumJ /2O7P82Gi7sav5GkjQg9WtGjorZQ7bOH9caDY=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=M1+DszzbpIZgbbAxVTsi3Ok2VY4=; b=EMSaq I+qfcH6To5uop4icSVpDGLcIodNSB2I6t/yohkj8F8Exlg07UQNHeiEQzbbvxm+H DgIJg6SgMAQOYUW6cSA0mGMzVRPB6qWncgBh7mnHyFS8QpMBRQwyAP4ZJT7yXE8g rxo7SS1qjqy+OjbuMhZbFwcTCMg5TcT/5cjuWQ=
- In-reply-to: <27798.1436519486@thecus.kiddle.eu>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <11523.1436283148@thecus.kiddle.eu> <CAHYJk3TP0AN2C8EK+DtVssBFtzsdccXbiGVTtFLJKrU7mcxF9Q@mail.gmail.com> <27798.1436519486@thecus.kiddle.eu>
Oliver Kiddle wrote on Fri, Jul 10, 2015 at 11:11:26 +0200:
> Mikael Magnusson wrote:
> > I don't really like this change. I usually forget the order for m3M+
> > glob qualifiers, so it's handy to just press tab to see when which is
> > valid, but now it starts autofilling stuff instead, and scrolling off
> > everything else on my terminal. It also doesn't seem to insert
> > anything actually sensible... but even if the bugs are fixed I would
> > prefer to turn the whole thing off. :)
>
> It can be turned off with:
> zstyle ':completion:*:dates' max-matches-length 0
> If the function stays, I can add some documentation for that.
>
> The line of _dates which causes the autofilling is:
> compstate[insert]=menu:$(( compstate[nmatches] + $#disp ))
>
> Other places where we set compstate[insert] in a similar manner include
> _pids and _mpc where we have insert-ids and insert-song-numbers styles
> to control this. I could do something similar here. Any thoughts
> on a style name: I think it is better to reuse generic names (i.e.
> insert-ids) rather than name it insert-dates? Would you be happy with
> that as a way forward? I wish it was possible to simply colour the
> current date but a pattern to do that would match, e.g. the 10th of
> every month.
I have two cases in mind:
- A command that takes more than one kind of "id"
e.g., 'find -mtime +3 -inode -1500' has two kinds.
- Configuring all instances of calendar completion
(_find, _globquals, others)
Both of these argue for being clear about "This is a calendar dates
completion" somewhere in the (context, style) zstyle coordinates. So
I think it suggests either "insert-dates" style, or an "insert-ids"
style with a "dates" or "timedelta" tag?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author