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

Weird problem with trn's Configure script



I finally tested trn's Configure script with zsh enulating sh and I found
one weird problem.  The script is trying to ensure that it is being run
by sh, not csh, so it does this test (tweaked for simplicity):

	(exit $?0) || echo You are not running sh

Under zsh 3.0pre6 in either zsh or sh compatibility mode this causes a
large chunk of the script to get executed multiple times.  Try the
following script:

	#!/local/bin/zsh
	(exit) || echo This should not be seen
	echo we are here

With pre6 you'll see the "we are here" statement twice!  In pre3 it
did something a little weirder:

	./testscript: command not found: ould [4]
	we are here

I haven't had a chance to check the code, but it looks like the closing
paren isn't being parsed correctly in this instance.  This only seems
to happen if the last command in ()'s is an exit.

..wayne..



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