zsh-users
 help / color / mirror / code / Atom feed
From: Phil Pennock <zsh-workers+phil.pennock@spodhuis.org>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: what is truth?
Date: Sat, 10 Oct 2015 06:59:35 +0000	[thread overview]
Message-ID: <20151010065935.GA18624@tower.spodhuis.org> (raw)
In-Reply-To: <561884F1.4030607@eastlink.ca>

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------------------------------


  parent reply	other threads:[~2015-10-10  7:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 22:09 "2004h" at the end of each prompt and "2004l" after pressing Enter on DragonFlyBSD console with zsh 5.1.1 Axel Beckert
2015-10-09 23:04 ` Bart Schaefer
2015-10-09 23:32   ` Axel Beckert
2015-10-09 23:41     ` Axel Beckert
2015-10-10  0:37   ` Oliver Kiddle
2015-10-10  0:59     ` Axel Beckert
2015-10-10  3:24       ` what is truth? Ray Andrews
2015-10-10  4:16         ` Kurtis Rader
2015-10-10  4:30           ` Ray Andrews
2015-10-10  4:47           ` Kurtis Rader
2015-10-10  4:25         ` Mikael Magnusson
2015-10-10  4:34           ` Ray Andrews
2015-10-10  4:26         ` Bart Schaefer
2015-10-10  4:52           ` Ray Andrews
2015-10-10  6:59         ` Phil Pennock [this message]
2015-10-11 13:54         ` Please don't hijack existing threads (was: what is truth?) Axel Beckert
2015-10-11 14:42           ` Please don't hijack existing threads Ray Andrews
2015-10-11 15:04             ` ZyX
2015-10-11 15:19               ` Ray Andrews

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=20151010065935.GA18624@tower.spodhuis.org \
    --to=zsh-workers+phil.pennock@spodhuis.org \
    --cc=rayandrews@eastlink.ca \
    --cc=zsh-users@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).