git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] completion: fix incorrect bash/zsh string equality check

From
Robert Estelle <robertestelle@gmail.com>
Date
Oct 8, 2021, 22:17 UTC
Message-ID
<CAMmwyQqw3ebSxnUnYDgignpF5jyca7TgzzduCeKdbzEn97Tddg@mail.gmail.com>
In-Reply-To
<YWCwvOdW/L5aMpr7@camp.crustytoothpaste.net>

On Fri, Oct 8, 2021 at 1:58 PM brian m. carlson <sandals@crustytoothpaste.net> wrote:

> It's actually preferable in most cases to use [ and = rather than [[ and
> ==, because the former looks for strict equality and the latter looks
> for pattern matching.

Yep, I agree with these style notes, but went with the prevalent style to avoid confusion. And note that the args here are both quoted, and so are treated as a literal comparison rather than globbed.

That said, whoever maintains that script, since this is a one-line change, I'm not insistent about one way of addressing this or another :)

Previous: brian m. carlsonNext: Robert Estelle
Message 4 of 11 in “completion: fix incorrect bash/zsh string equality check”
  1. completion: fix incorrect bash/zsh string equality checkRobert Estelle via GitGitGadget, Oct 7, 2021
  2. Junio C HamanoOct 8, 2021
  3. brian m. carlsonOct 8, 2021
  4. Robert EstelleOct 8, 2021
  5. Robert EstelleOct 8, 2021
  6. Junio C HamanoOct 8, 2021
  7. Robert EstelleOct 8, 2021
  8. Junio C HamanoOct 8, 2021
  9. Robert EstelleOct 25, 2021
  10. completion: fix incorrect bash/zsh string equality checkRobert Estelle via GitGitGadget, Oct 25, 2021
  11. Junio C HamanoOct 28, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.