From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12421 invoked by alias); 10 Oct 2015 07:16:21 -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: 20731 Received: (qmail 13363 invoked from network); 10 Oct 2015 07:16:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d201408; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date; bh=S0fSPMR6KbptxfGqcDhcgNUUh+njFIlSOKpHuAR86ug=; b=tsFBWa5qE2FiB4kRC8ASY5mKaG qQgI8rdzYxdy84GqcuUqO664JLRmKE6NxLB2J+oJif2BC75HlgCH2IaJLJjF5d9s7QMMVRm9YZmru gVNu7ntHd6pdJ64E5abHg/sUChxOshU/6qLnhJowZliDloNSJoOjxITrSzHpyzvyvDMACC8I2Cnqm ki+uVlkXjbK4CCtSj6gh84eKVJkE; Date: Sat, 10 Oct 2015 06:59:35 +0000 From: Phil Pennock To: Ray Andrews Cc: zsh-users@zsh.org Subject: Re: what is truth? Message-ID: <20151010065935.GA18624@tower.spodhuis.org> Mail-Followup-To: Ray Andrews , zsh-users@zsh.org References: <20151009220942.GH12039@sym.noone.org> <151009160452.ZM5208@torch.brasslantern.com> <4505.1444437453@thecus.kiddle.eu> <20151010005939.GK12039@sym.noone.org> <561884F1.4030607@eastlink.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <561884F1.4030607@eastlink.ca> OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/0x4D1E900E14C1CC04.asc On 2015-10-09 at 20:24 -0700, Ray Andrews wrote: > > test () > { > [[ "$1" = <-> ]] && echo true > } > > I don't have a clue what to make of ' <-> '. What value > would work? Any number. Well, okay, any non-negative integer. It's a glob operator: ----------------------------8< cut here >8------------------------------ <[x]-[y]> Matches any number in the range x to y, inclusive. Either of the numbers may be omitted to make the range open-ended; hence `<->' matches any number. To match individual digits, the [...] form is more efficient. ----------------------------8< cut here >8------------------------------