Using 4.2.0, why does this return successful?
Both sh(freebsd) and bash echo an error message and return 2.
> flaw@void:~ % echo $ZSH_VERSION
> 4.2.0
> flaw@void:~ % test sdf -ge 0
> flaw@void:~ % echo $?
> 0
> flaw@void:~ % /bin/sh
> flaw@void $ test sdf -ge 0
> test: sdf: bad number
> flaw@void $ echo $?
> 2
> flaw@void:~ % bash
> bash-2.05b$ test sdf -ge 0
> bash: test: sdf: integer expression expected
> bash-2.05b$ echo $?
> 2
I know zsh is not bash or sh, but this is a fairly serious inconsistency, IMO.
--
Regards,
James William Pye
Attachment:
signature.asc
Description: This is a digitally signed message part