From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1865 invoked by alias); 23 Jul 2010 20:10:05 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15198 Received: (qmail 4451 invoked from network); 23 Jul 2010 20:10:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at benizi.com designates 64.130.10.15 as permitted sender) Date: Fri, 23 Jul 2010 16:09:33 -0400 (EDT) From: "Benjamin R. Haskell" To: Zsh Users Subject: Rounding of glob qualifiers? Message-ID: User-Agent: Alpine 2.01 (LNX 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII The rounding seems a bit odd here: ## some files less than, equal to, and greater than 1024 bytes $ ls -l {lt,eq,gt}-1k -rw------- 1 bhaskell users 1023 2010-07-23 16:08 lt-1k -rw------- 1 bhaskell users 1024 2010-07-23 16:08 eq-1k -rw------- 1 bhaskell users 1025 2010-07-23 16:08 gt-1k ## why does lt-1k match here: $ print -l *-1k(L-1024) lt-1k ## and here: $ print -l *-1k(Lk1) eq-1k lt-1k ## but not here? $ print -l *-1k(Lk-1) zsh: no matches found: *-1k(Lk-1) Not claiming it's a 'bug', per se, but what's the rationale for rounding up? Seems similar to the 'a' glob qualifier caveat with 'whole units', but I didn't see an explanation similar to fractional-part-is-discarded for 'L'. Did I overlook it? (Discovered while trying to grep for something in files <1K -- which only matched files of size 0. There's probably a case where this behavior is preferable.) -- Best, Ben