zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: zpc_special [was Re: question about glob qualifier format (#qx)]
Date: Sat, 21 Sep 2013 16:52:01 -0700	[thread overview]
Message-ID: <130921165201.ZM24371@torch.brasslantern.com> (raw)
In-Reply-To: <130921163531.ZM18698@torch.brasslantern.com>

On Sep 21,  4:35pm, Bart Schaefer wrote:
}
} I believe this has to do with the new zpc_special[] array in pattern.c.
} The first time we enter zglob(), it has not been initalized yet (?) and
} so "#" is believed to be an active pattern chracter even though the
} EXTENDED_GLOB option may not be set.  The next time through zpc_special
} will have been initialized, but it doesn't get re-initialized when the
} extendedglob option is toggled (?) so the parsing of "#" may be left in
} the wrong state.

Confirmation of this -- if I make sure to evaluate an unqualified pattern
before evaluating each qualified glob, then everything "works":

schaefer[528] Src/zsh -f
torch% print *(#q/)
Config Doc Etc Src Test
torch% print *(#q/)
zsh: unknown file attribute: #
torch% 
schaefer[529] Src/zsh -f
torch% : *
torch% print *(#q/)
zsh: unknown file attribute: #
torch% setopt extendedglob
torch% print *(#q/)       
zsh: unknown file attribute: #
torch% : *
torch% print *(#q/)
Config Doc Etc Src Test
torch% 


(I tweaked the "unknown file attribute" error message to get it to show
what character caused the failure, which I figure is helpful so I've
committed/pushed it as an unposted change.)


  reply	other threads:[~2013-09-21 23:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130920111110.GA4501@localhost.localdomain>
     [not found] ` <20130920123830.30111071@pwslap01u.europe.root.pri>
     [not found]   ` <20130920233930.GB4501@localhost.localdomain>
     [not found]     ` <130921013028.ZM17637@torch.brasslantern.com>
2013-09-21 23:35       ` Bart Schaefer
2013-09-21 23:52         ` Bart Schaefer [this message]
2013-09-23 19:47         ` Peter Stephenson
2013-09-24  6:27           ` 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=130921165201.ZM24371@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).