From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17884 invoked by alias); 21 Sep 2013 23:51:55 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31740 Received: (qmail 16346 invoked from network); 21 Sep 2013 23:51:40 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130921165201.ZM24371@torch.brasslantern.com> Date: Sat, 21 Sep 2013 16:52:01 -0700 In-reply-to: <130921163531.ZM18698@torch.brasslantern.com> Comments: In reply to Bart Schaefer "zpc_special [was Re: question about glob qualifier format (#qx)]" (Sep 21, 4:35pm) References: <20130920111110.GA4501@localhost.localdomain> <20130920123830.30111071@pwslap01u.europe.root.pri> <20130920233930.GB4501@localhost.localdomain> <130921013028.ZM17637@torch.brasslantern.com> <130921163531.ZM18698@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: zpc_special [was Re: question about glob qualifier format (#qx)] MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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.)