zsh-workers
 help / color / mirror / code / Atom feed
From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@math.gatech.edu
Subject: Re: PATCH: 3.1.5 - (Sven) Case-insensitive globbing
Date: Tue, 3 Nov 1998 09:12:29 +0100 (MET)	[thread overview]
Message-ID: <199811030812.JAA23176@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Bruce Stephens's message of 02 Nov 1998 17:45:39 +0000


Bruce Stephens wrote:

> 
> Peter Stephenson <pws@ibmth.df.unipi.it> writes:
> 
> > This doesn't clash with any existing syntax.  Obviously you need
> > EXTENDED_GLOB set.
> > 
> > Syntax 1       Syntax 2
> > (#ifoo)bar     ((#i)foo)bar    match FOObar FoObar fOobar, not FOOBAR
> > bar(#ifoo)     bar(#i)foo      same with the bits the other way round
> > (#lfooBAR)     (#l)fooBAR      match FOOBAR FoOBAR fOoBAR, not foobar
> > (#ifoo(#cbar)) (#i)foo(#c)bar  same as first example; #c negates i or l
> > 
> > So in the first case, only the #X is the flag and grouping is normal,
> > while in the second case the whole of (#X) is the flag and doesn't
> > mark a separate group.  In both cases the effect stays until the end
> > of the nearest enclosing group.
> > 
> > #s (for significant) could be an alternative to #c; #l corresponds to
> > Sven's (f) qualifier, i.e. only lower case letters in the pattern
> > match case-insensitively in the target string.
> > 
> > I think I find the second version (which is also more perl-like) a
> > bit cleaner.
> 
> I prefer the second versions too.  What would really make it
> compelling, of course, would be other flags that you might want to use
> (when the first syntax could get tricky and ambiguous).  
> 
> I can only think of one candidate at present: ignore dots.  #d, say.
> Then, a single pattern could match README, READ.ME, Read.Me and so on:
> (#di)readme.
> 
> But my example is strained, I don't really suggest that it would be a
> good idea.

I completely agree, there is a whole new set of globbing options
on the horizon ;-)

About the `options for the whole path' thing (which I would like to
have, too): why not use a generic approach, like the `^' and `-' glob
modifiers, i.e. `(#i)' works on the current path component, probably
only up to the next `(#...)' and `(#/i)' works on this and all
following components (until switched off again).

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


         reply	other threads:[~1998-11-03  8:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-10-31 10:14 Bart Schaefer
1998-11-02  9:21 ` Zefram
1998-11-02 17:07   ` Peter Stephenson
1998-11-02 17:45     ` Bruce Stephens
1998-11-02 18:06     ` Zefram
1998-11-03  8:12       ` Sven Wischnowsky [this message]
1998-11-03 12:22         ` Bruce Stephens
1998-11-03 12:47           ` Bruce Stephens
1998-11-03 15:01             ` Zefram
1998-11-03 15:27               ` Bruce Stephens
     [not found]         ` <MLIST_vbn269dkyw.fsf@snake.isode.com>
1998-11-03 18:09           ` Jarkko Hietaniemi
1998-11-03 18:54             ` Zefram
1998-11-03 19:14               ` Jarkko Hietaniemi
1998-11-03 19:27                 ` Zefram
1998-11-03 19:36                   ` Jarkko Hietaniemi
1998-11-04 18:48                     ` Bart Schaefer
1998-11-05  9:26                       ` PATCH: 3.1.5: Case-insensitive globbing (2) Peter Stephenson
1998-11-05 18:15                         ` Bart Schaefer
1998-11-06 11:01                           ` PATCH: 3.1.5: doc fix, was re: Case-insensitive globbing Peter Stephenson
1998-11-06 13:43                             ` Bruce Stephens
1998-11-06  9:24                     ` Approximate matching Bart Schaefer

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=199811030812.JAA23176@beta.informatik.hu-berlin.de \
    --to=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@math.gatech.edu \
    /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).