Hello,

In version 5.9 the [[ ]] operator is behaving unexpectedly for the following case:

$ watch ls &
$ [ $(jobs -l | wc -l) -gt 0 ] && echo jobs found || echo no jobs 
jobs found
$ [[ $(jobs -l | wc -l) -gt 0 ]] && echo jobs found || echo no jobs
no jobs

Expected

The result should be the same, in this case, with both [ ] and [[ ]].

Actual

[[ $(jobs -l | wc -l) -gt 0 ]] exit status is > 0 when there are jobs running.

Version information

Previous version, 5.8.1 was working as expected.

Distros

Tested in the following distros

--
Paulo Diovani Gonçalves,
blog.diovani.com / @paulodiovani