PS: I've been running zsh in an xterm, and several times it has died
with a segmentation fault. It also misbehaves sometimes when
displaying commands spanning more than one line from the history.
Does anyone know why this happens or how I can go about correcting
it?
use [[...]] to test attributes of files and to compare strings. use
((...)) to test arithmetic expressions. example:
foo() {
if (( $# == 0 ))
then
echo usage: foo \<string\>
else
if [[ $1 = duck ]]
then
echo it\'s a duck
else
echo it\'s not a duck
fi
fi
}
% foo
usage: foo <string>
% foo cat
it's not a duck
% foo duck
it's a duck
%
see the ARITHMETIC EVALUATION and CONDITIONAL EXPRESSIONS section of
the zsh (v2.1.0) man page.
>PS: I've been running zsh in an xterm, and several times it has died
> with a segmentation fault. It also misbehaves sometimes when
> displaying commands spanning more than one line from the history.
> Does anyone know why this happens or how I can go about correcting
> it?
sorry, can't help you here. i don't experience this.
eric de mund
e...@netcom.com
-Zubin.
Counter-example: zsh runs fine on a DECstation 2100 when compiled with
V2.0 gcc -traditional -O2. It also gets a 10% size reduction over zsh
compiled with ultrix cc -O3. What machine and version of gcc are you
using?
Jonathan H.
ObShell : implementing Mach's setpath(1) as a single zsh function.