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

Re: %B%~%b bug in $PROMPT in 3.1.5 ?



On Jan 4, 10:05pm, Timothy J Luoma wrote:
} Subject: Re: %B%~%b bug in $PROMPT in 3.1.5 ?
}
} So where is the option to turn OFF ksh compatibility?
} 
} When things break when upgrading which have worked fine before, why should
} I upgrade?

Some years ago it became a goal of several of the most active zsh
contributors to make zsh capable of acting as a replacement for /bin/sh,
and particularly for ksh.  I griped about this repeatedly for some time,
but they had the support of the archive maintainer so I eventually gave
up and ignored zsh development for a long while.  (Somewhat ironically,
Paul Falstad was working for me during that period ....)  I started to
pay attention again sometime in the late 2.6's when most of the horrible
bugs in 2.5.x had been fixed.

In short, I ran 2.4.306 as my everyday shell until 3.0 was released.
(Yes, 306; the version number changed faster back then.)

I told you that story so I can tell you this one:

Things are much better now than they were around the time of 2.5.  Most
of the sh/ksh stuff can be controlled by the "emulate" command.  However,
ksh compatibility remains one of the goals of many of the people who
devote their efforts to zsh, and (except for "ksharrays") parameters are
not one of the places where such behavior can depend on emulation mode.
A parameter can't temporarily become non-special when a function uses
"emulate ksh", and the more special parameters there are the more likely
it is that a name collision will prevent zsh from interpreting some ksh
script or other.

So that's the rationale for the change that was made to PWD, OLDPWD, and
possibly some other parameters (I forget) during 3.1 development.  It's
rarely intentional that such changes break things [*] but zsh is complex
and sometimes bugs are introduced.  That's why 3.0.5 is the "production"
release; 3.1.5 is by definition unstable, though it gets fixes posted
more rapidly when bugs are reported.

In other words, you *shouldn't* upgrade unless there's some compelling
reason to do so; some 3.1.x feature you can't live without.

[*] Don't get me started about the revised "setopt" behavior or the lack
    of compctl defaults.  They're two reasons I ignored 3.1.x for x < 4.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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