From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19927 invoked by alias); 10 Dec 2011 17:44:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29979 Received: (qmail 11190 invoked from network); 10 Dec 2011 17:44:28 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_MED,T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 128.2.11.95 is neither permitted nor denied by SPF record at _spf.google.com) Date: Sat, 10 Dec 2011 12:44:11 -0500 From: gi1242+zsh@gmail.com To: zsh-workers@zsh.org Subject: Re: Documentation error Message-ID: <20111210174408.GE8394@andrew.cmu.edu> Mail-Followup-To: gi1242+zsh@gmail.com, zsh-workers@zsh.org References: <20111210170956.GD8394@andrew.cmu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-PMX-Version: 5.5.9.388399, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2011.5.19.222118 X-SMTP-Spam-Clean: 34% ( RDNS_SUSP_FORGED_FROM 3.5, FORGED_FROM_GMAIL 0.1, LEO_OBFU_SUBJ_RE 0.1, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1300_1399 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NEG_0500 0, NO_REAL_NAME 0, NO_URI_FOUND 0, RDNS_BROADBAND 0, RDNS_GENERIC_POOLED 0, RDNS_POOLED 0, RDNS_SUSP 0, RDNS_SUSP_GENERIC 0, RDNS_SUSP_SPECIFIC 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CD 0, __CT 0, __CT_TEXT_PLAIN 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __PHISH_SPEAR_STRUCTURE_1 0, __RDNS_BROADBAND_5 0, __RDNS_POOLED_11 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT 0) X-SMTP-Spam-Score: 34% X-Scanned-By: MIMEDefang 2.60 on 128.2.11.95 On Sat, Dec 10, 2011 at 06:37:04PM +0100, Mikael Magnusson wrote: >> Hi All, >> >> Is the following an error in the documentation from man zshcompsys: >> >> _example_caching_policy () { >> # rebuild if cache is more than a week old >> local -a oldp >> oldp=( "$1"(Nmw+1) ) >> (( $#oldp )) >> } >> >> 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.] GI -- Chemicals: Noxious substances from which modern foods are made.