From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20550 invoked by alias); 2 Jun 2013 07:17:05 -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: 31445 Received: (qmail 10199 invoked from network); 2 Jun 2013 07:16:58 -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: <130602001627.ZM15649@torch.brasslantern.com> Date: Sun, 02 Jun 2013 00:16:27 -0700 In-reply-to: <20130601211836.550bd8ac@pws-pc.ntlworld.com> Comments: In reply to Peter Stephenson "Re: PATCH: configurability of pattern characters, part 1" (Jun 1, 9:18pm) References: <20130601002954.0e30d7b9@pws-pc.ntlworld.com> <130531232223.ZM13592@torch.brasslantern.com> <20130601211836.550bd8ac@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, 9:18pm, Peter Stephenson wrote: } } The simple meaning for enable -p is that it reverses a disable, it } doesn't explicitly enable something that's not allowed by the options. Agreed. In the other cases of disable, you have to create something a different way (function, alias) before you can disable/enable it, so I think that's fine here too. I'm still not entirely clear what happens in e.g. this case: % setopt kshglob % disable -p '+(' % setopt kshglob Does the setopt re-enable '+(' or does it remain disabled? What about: % setopt kshglob % disable -p '+(' % unsetopt kshglob % setopt kshglob } "disable -p" should output the current settings, which we could save. Explicit save/restore not necessary with the patch in 31444, right? } Or how about readonly zsh/parameter arrays corresponding to enabled and } disabled patterns? Same idea, just slightly more efficient to save. I think it'd be fine to add these, though calling one of them $patterns is likely to clash with some existing scripts. I'd vote for having it be readonly like $builtins and $reswords. The writable zsh/parameter hashes are for objects that can be created/deleted by the user, but we are not allowing the user to create new pattern tokens.