From: Mikael Magnusson <mikachu@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: zsh-workers@zsh.org
Subject: Re: Documentation error
Date: Sat, 10 Dec 2011 19:54:02 +0100 [thread overview]
Message-ID: <CAHYJk3SjL3EgdDeY8EN+aK5G0M=RXmnKsb=s_HTMdQsg_fS7xw@mail.gmail.com> (raw)
In-Reply-To: <20111210182912.3403de1b@pws-pc.ntlworld.com>
On 10 December 2011 19:29, Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> On Sat, 10 Dec 2011 12:44:11 -0500
> gi1242+zsh@gmail.com wrote:
>> >>...
>> >> # rebuild if cache is more than a week old
>> >> local -a oldp
>> >> oldp=( "$1"(Nmw+1) )
>> >>...
>> >> Technically won't this rebuild the cache if it's more than TWO weeks
>> >> old? "$1"(Nmw+0) seems to do one week old for me,
>> >
>> > It depends on what you mean by more than one week. The way it works in
>> > zsh is that -, +, and no sign are disjunct sets, so mw-1, mw1, mw+1
>> > don't have any overlap. mw1 is any files that are one week old, which
>> > is 7-13 days, so more than that is 14 days old (two weeks).
>>
>> Hmm. mw+1 gave me false for a 13 day old file, and true for a 15 day old
>> file. But mw+0 gave me true for all files more than a week old.
>>
>> Reading the comment in the ZSH man page (included above), I'd guess it
>> means that the cache will be rebuilt if it's more than 7 days old.
>> However, it appears to only be rebuilt if it's more than 14 days old?
>>
>> Perhaps the comment above (or example above) should be changed to match
>> up? [I'm of course not advocating any change in ZSH behaviour.]
>
> It does seem to violate the principle of least surprise --- the
> documentation for globbing qualifiers now has a long spiel about
> ignoring the fraction part of the difference in times to try to explain.
> Maybe +7 (days) is better? Of course there's still the same oddity at
> the level of a day but that's a good deal easier to sweep under the
> carpet.
There's no day modifier :).
--
Mikael Magnusson
next prev parent reply other threads:[~2011-12-10 18:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-10 17:09 gi1242+zsh
2011-12-10 17:37 ` Mikael Magnusson
2011-12-10 17:44 ` gi1242+zsh
2011-12-10 18:29 ` Peter Stephenson
2011-12-10 18:54 ` Mikael Magnusson [this message]
2011-12-10 19:26 ` Peter Stephenson
2011-12-10 20:02 ` PATCH: _globquals: Say what the digit is when completing modification time qualifiers Mikael Magnusson
2011-12-13 19:23 ` PATCH: _globquals: Say what the digit is when completing time qualifiers, add d Mikael Magnusson
2011-12-13 21:27 ` Peter Stephenson
2011-12-10 20:13 ` Documentation error Peter Stephenson
2011-12-11 2:22 ` gi1242+zsh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHYJk3SjL3EgdDeY8EN+aK5G0M=RXmnKsb=s_HTMdQsg_fS7xw@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).