From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22632 invoked by alias); 1 Jun 2013 06:22:52 -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: 31442 Received: (qmail 13418 invoked from network); 1 Jun 2013 06:22:45 -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: <130531232223.ZM13592@torch.brasslantern.com> Date: Fri, 31 May 2013 23:22:23 -0700 In-reply-to: <20130601002954.0e30d7b9@pws-pc.ntlworld.com> Comments: In reply to Peter Stephenson "PATCH: configurability of pattern characters, part 1" (Jun 1, 12:29am) References: <20130601002954.0e30d7b9@pws-pc.ntlworld.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "Zsh Hackers' List" Subject: Re: PATCH: configurability of pattern characters, part 1 MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jun 1, 12:29am, Peter Stephenson wrote: } } The second step, to follow: now we have the "zpc_special" array, it will } be possible (and fairly straightforward) to introduce a special variable } to indicate pattern characters that should be turned off Possible alternative idea -- use the enable/disable builtins? disable -p '^' '(' '+(' (Choose another switch if you don't like -p for pattern.) I suppose that's harder to set/restore on within/without a local scope. On the other hand I've frequently wished that some internal tables were scope-able; e.g., making the $functions special variable a local has subtle undesirable side-effects on autoloaded functions, but if the underlying table itself could be localized, those would go away. } We'll need to set the new shell variable(s) locally to empty for } completion. Hmm, that's another problem with the enable/disable idea ... or is it? "emulate -R zsh -c 'autoload _main_complete'" should do the trick ...? } I think also "emulate" should clear them (locally for "emulate -L") to } present a pristine pattern environment for emulation. I agree ... which for me is an argument *against* using variables for this. I know emulation modes already play with the special-ness of things like HISTCHARS and MANPATH, but it doesn't actually go so far as creating empty locals for them. Speaking of HISTCHARS, do we agree that it'd be a bad idea to be able to swap around which characters have what glob semantics? E.g., it's OK if * means only "*", but you can't make % mean "match any number of any character". -- Barton E. Schaefer