From: Paulo Diovani <firstname.lastname@example.org> To: email@example.com Subject: [Bug] comparisson operator `[[` not working as expected Date: Mon, 20 Jun 2022 15:32:32 -0300 [thread overview] Message-ID: <CABdM12-XmzJNFECJto8hR0YROQOuq71p20Hb9jVAx6YNyF2RDg@mail.gmail.com> (raw) [-- Attachment #1: Type: text/plain, Size: 771 bytes --] 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 - Zsh zsh 5.9 (x86_64-pc-linux-gnu) Previous version, 5.8.1 was working as expected. Distros Tested in the following distros - Arch Linux (bare metal, docker) - Debian Sid (docker) -- Paulo Diovani Gonçalves, blog.diovani.com / @paulodiovani <http://twitter.com/paulodiovani> [-- Attachment #2: Type: text/html, Size: 7093 bytes --]
next reply other threads:[~2022-06-20 18:33 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-06-20 18:32 Paulo Diovani [this message] 2022-06-20 19:54 ` Stephane Chazelas 2022-06-20 20:07 ` Paulo Diovani 2022-06-20 20:30 ` Bart Schaefer 2022-06-21 0:47 ` Mikael Magnusson 2022-06-21 3:42 ` Bart Schaefer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CABdM12-XmzJNFECJto8hR0YROQOuq71p20Hb9jVAx6YNyF2RDg@mail.gmail.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [Bug] comparisson operator `[[` not working as expected' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).