Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [[ ... ]], [ ... ], bash, zsh
- X-seq: zsh-users 6468
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: [[ ... ]], [ ... ], bash, zsh
- Date: Thu, 14 Aug 2003 01:29:05 +0000
- In-reply-to: <20030813230848.GA670@xxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030813221633.GA1343@xxxxxxxxxxx> <87ptj9ch5b.fsf@xxxxxxxxxxxxxxx> <20030813230848.GA670@xxxxxxxxxxx>
On Aug 14, 1:08am, Haakon Riiser wrote:
} Subject: Re: [[ ... ]], [ ... ], bash, zsh
}
} if [[ $INITIALIZED ]]; then
}
} if [[ -n $INITIALIZED ]]; then
}
} so I just wanted to know why it was decided that -n should not
} be optional.
It's not the case that someone decided that -n should not be optional.
It is the case that someone decided that arbitrary non-empty strings
should not be considered equivalent to the value "true", and that the
empty string should not be considered equivalent to "false".
The zsh [[ ]] is based on ksh, not on bash:
$ [[ $INITIALIZED ]]
ksh: syntax error: `$INITIALIZED' missing expression operator
So "someone" is probably David Korn.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author