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

Re: PATCH: Re: Bug: time doesn't work on builtins



On 13 Sep, Bart Schaefer wrote:
> +  ( setopt errexit; time =false; print notreached )
> +1:`time' of failed external with errexit
> +*?*user*system*cpu*total

This test fails on Solaris because the external false returns -1 instead
of 1.

Two alternatives that come to mind would be test which returns false if
given no arguments and expr 0 which has the advantage of not existing as
a builtin so no need for the =. Both of those return 1 on Solaris for
failure.

Oliver




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