From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Hackers' List <zsh-workers@zsh.org>
Subject: Re: PATCH: configurability of pattern characters, part 1
Date: Mon, 03 Jun 2013 09:40:14 +0100 [thread overview]
Message-ID: <20130603094014.4728e466@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <130602001627.ZM15649@torch.brasslantern.com>
On Sun, 02 Jun 2013 00:16:27 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> 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?
It remains disabled: that's a separate set of controls.
< What about:
>
> % setopt kshglob
> % disable -p '+('
> % unsetopt kshglob
> % setopt kshglob
It will stay disabled until you "enable -p '+('" or enter an emulation.
But if you enter a non-ksh emulation in which you "setopt kshglob" it
will pop up.
By the way, I suspect I need to do more work on the various expressions
with parentheses to make everything work smoothly.
> } "disable -p" should output the current settings, which we could save.
>
> Explicit save/restore not necessary with the patch in 31444, right?
Yes, I'll just need to ensure LOCAL_PATTERNS is set with the other
completion options and use enable -p to ensure extendedglob patterns are
enabled.
> } 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.
It seems like I don't really have a use for these for now.
pws
next prev parent reply other threads:[~2013-06-03 8:50 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-31 23:29 Peter Stephenson
2013-06-01 6:22 ` Bart Schaefer
2013-06-01 20:18 ` Peter Stephenson
2013-06-02 7:16 ` Bart Schaefer
2013-06-03 8:40 ` Peter Stephenson [this message]
2013-06-03 15:05 ` Bart Schaefer
2013-06-03 15:31 ` Peter Stephenson
2013-06-01 23:09 ` PATCH: configurability of pattern characters, part 2 Peter Stephenson
2013-06-04 6:45 ` Bart Schaefer
2013-06-04 8:44 ` Peter Stephenson
2013-06-04 14:50 ` Bart Schaefer
2013-06-04 15:09 ` Peter Stephenson
2013-06-09 18:06 ` Peter Stephenson
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=20130603094014.4728e466@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.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).