Zsh Mailing List Archive
Messages sorted by:
Re: zsh-3.0-pre4 released
- X-seq: zsh-workers 1791
- From: Zefram <A.Main@xxxxxxxxxxxxxxxxx>
- To: schaefer@xxxxxxx
- Subject: Re: zsh-3.0-pre4 released
- Date: Sat, 27 Jul 1996 18:03:00 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx, hzoli@xxxxxxxxxx
- In-reply-to: <960726215746.ZM20421@xxxxxxxxxxxxxxxxxxxxxxx> from "Bart Schaefer" at Jul 26, 96 09:57:46 pm
>Actually, I'd say the biggest change is "setopt nofoo" == "unsetopt foo".
>Which I still think should have been left out until some post-3.0 version.
Why? It breaks nothing except for scripts that try to detect options
being set by doing `setopt | grep foo`, which is broken anyway. The
old names still work in [[ -o nofoo ]].
>I must say, having an option called BAD_PATTERN feels rather odd to me.
>Since we have IGNORE_BRACES, either we should have IGNORE_BAD_PATTERN,
>or else we should have just BRACES. Or it should have been left alone.
[more like this]
Yes, I thought so too. However, a "no" prefix is the prevalent way of
negating option sense, so I added support for that only. To change
IGNORE_BRACES to NO_BRACES (i.e. a negated BRACES) would break backward
compatibility, unless there is some way to support the old name.
I do plan to write a patch to add exactly such a mechanism. As it will
no doubt be somewhat controversial, I'll describe it now for people to
The general idea is that we have a list of fixed option `aliases',
which provide alternative names for certain options. The list itself
would look something like
The "trackall" entry provides a ksh name for the equivalent zsh
option. The "ignorebraces" entry provides backward compatibility, in
the hypothetical situation that we decide that "braces" is a better
name. I wouldn't make that type of change when adding the mechanism,
but would only do some ksh compatibility names.
The aliased names would be handled by optlookup(), with essentially no
changes required anywhere else. In fact, I'd probably make the list
itself local to optlookup(). This flexibility, to add new types of
option name, is one of the reasons I added the optlookup()
I'd like to know what people think of this idea. In particular,
Zoltan, would you allow such a patch into the baseline?
Messages sorted by: