Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: configurability of pattern characters, part 1



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.



Messages sorted by: Reverse Date, Date, Thread, Author