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

Re: Bug#310872: zsh can't be a ksh replacement (can't trap ERR).

Bart Schaefer a écrit :
> No, you just have to put the above in /etc/zshenv, which is read by all
> instances of zsh, whether script or interactive.

I wish you were right, this would solve the problem. but according
to zsh man page :
       In sh and ksh compatibility modes
       The  usual zsh startup/shutdown scripts are not executed.

I just tried to put ": > /tmp/zsh.$$" in /etc/zsh/zshenv and run ksh (the
symlink to zsh)... No file were present in /tmp :-(

> That's not the only incompatibility, by a long shot.  Don't try scripts
> using namerefs or discipline functions, for example.
No doubt. But as I wrote in reply to Clint message, we all have different
idea of what a 'ksh' should be.
I originally sent the report because I *feel* a trap on ERR was such a
basic thing that any ksh should implement it.

I learned life is not that simple, and one OS uses SIGERR just to make life
harder for every one.

Now, unless you have another workaround, it seems there is no
simple way to solve this.

I can only hope Debian maintainers will agree with me, and perhaps some
zsh-workers too ;-)

> } (By the way, what are the platform with OS
> } SIGERR ? And do some ksh run on them ?)
> UNICOS, according to the Zsh FAQ.  I have no idea whether ksh has been
> ported to that.
Thanks for the info.

Going back to real life,
1)II1)199(3+)1)K+)19;(";main(_){while(*p){for(_=*p-32>>3;_;--_)putchar(' ');if
(!(_=*p++-32&7))putchar('\n');else while(_--)printf("_/");}}

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