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

Re: Trying to learn ... RCS and GLOBAL_RCS

On Sat, Mar 26, 2022 at 9:45 AM Perry Smith <pedz@xxxxxxxxxxxxxxxx> wrote:
> > On Mar 26, 2022, at 11:39, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > Double negative.  "unsetopt" shows the options that are not set, so
> > "not no globalrcs" == "globalrcs".
> Oh dear…  That is definitely where my confusing is coming from.

History lesson time ...

The zsh option naming convention was originally taken from csh.  The
most obvious example is the csh "nomatch" default that causes "echo
foo*bar" to print "No match" when the globbing comparison fails.  To
turn off the "nomatch" behavior, you reversed it as "set nonomatch".
This is because csh didn't have options with "off" state, it only had
the default behavior and options that when set, changed the default

Consequently a bunch of zsh options got named "nosomething" and to
turn them off you would use "setopt nonosomething".

At some point in the mid-90s it was the list consensus that
documenting the options under their "nosomething" names was confusing,
so the docs all got rewritten to use the "affirmative" names.  The
output of "setopt" and "unsetopt", however, continues using the "no"
prefix based on the historic practice.

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