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

Re: [PATCH] git-prompt: changes == to = for zsh's sake

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 21, 2020, 00:40 UTC
Message-ID
<xmqqh7u18zu1.fsf@gitster.c.googlers.com>
In-Reply-To
<20200721002309.GA178512@pug.qqx.org>
Aaron Schrab <aaron@schrab.com> writes:
Show 6 quoted lines
> An alternate fix would be to switch to using double square brackets
> instead of single square brackets for the test. Since contents of
> double brackets have their own parsing rules the `equals` option
> doesn't apply there, and so `==` is available for checking equality
> same as in bash.  IMHO, this provides saner behavior in general;
> although it's definitely not POSIX compliant.

It won't be but it does not have to be POSIX compliant anyway; after all this is prompt support for bash with support for zsh added on the side, neither is limited to strict POSIX.

I'd say that the patch posted is good as-is.
Thanks.
Previous: Aaron Schrab
Message 6 of 6 in “git-prompt: changes == to = for zsh's sake”
  1. git-prompt: changes == to = for zsh's sakeDavid J. Malan via GitGitGadget, Jul 20, 2020
  2. Junio C HamanoJul 20, 2020
  3. Elijah NewrenJul 21, 2020
  4. git-prompt: change == to = for zsh's sakeDavid J. Malan via GitGitGadget, Jul 21, 2020
  5. Aaron SchrabJul 21, 2020
  6. Junio C HamanoJul 21, 2020

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.