zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Include US spelling of "grey"
@ 2021-12-25 21:35 Matt Alexander
  2022-01-01 22:40 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Matt Alexander @ 2021-12-25 21:35 UTC (permalink / raw)
  To: zsh-workers; +Cc: Matt Alexander, Daniel Shahaf

The U.S. spelling of "colour" ("color") is referenced in the code,
but the U.S. spelling of "grey" ("gray") is not. This change remedies that.
https://www.merriam-webster.com/words-at-play/gray-vs-grey-usage-difference

A code review has been conducted at GitHub:
https://github.com/zsh-users/zsh/pull/84

Co-authored-by: Daniel Shahaf <d.s@daniel.shahaf.name>
---
 ChangeLog             | 4 ++++
 Functions/Misc/colors | 8 +++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bb24842f4..c14848c17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2021-12-25  Matt Alexander  <matt@alxndr.me>
+
+	* Include US spelling of "grey" ("gray")
+
 2021-12-07  Oliver Kiddle  <opk@zsh.org>
 
 	* 49633: Completion/Unix/Command/_git: update options for git 2.34
diff --git a/Functions/Misc/colors b/Functions/Misc/colors
index b221e6688..5e9d77d10 100644
--- a/Functions/Misc/colors
+++ b/Functions/Misc/colors
@@ -83,9 +83,11 @@ for k in ${color[(I)3?]}; do color[fg-${color[$k]}]=$k; done
 
 # This is inaccurate, but the prompt theme system needs it.
 
-color[grey]=${color[black]}
-color[fg-grey]=${color[grey]}
-color[bg-grey]=${color[bg-black]}
+for k in grey gray; do
+  color[$k]=${color[black]}
+  color[fg-$k]=${color[$k]}
+  color[bg-$k]=${color[bg-black]}
+done
 
 # Assistance for the color-blind.
 
-- 
2.34.1



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] Include US spelling of "grey"
  2021-12-25 21:35 [PATCH] Include US spelling of "grey" Matt Alexander
@ 2022-01-01 22:40 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2022-01-01 22:40 UTC (permalink / raw)
  To: Matt Alexander; +Cc: Zsh hackers list

On Sat, Dec 25, 2021 at 1:45 PM Matt Alexander <matt@alxndr.me> wrote:
>
> The U.S. spelling of "colour" ("color") is referenced in the code,
> but the U.S. spelling of "grey" ("gray") is not. This change remedies that.
> https://www.merriam-webster.com/words-at-play/gray-vs-grey-usage-difference

I hate to argue with Merriam-Webster, but I'm from the US and I wrote
the "colors" function.

Nevertheless, this patch is a perfectly reasonable change.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-01-01 22:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-25 21:35 [PATCH] Include US spelling of "grey" Matt Alexander
2022-01-01 22:40 ` Bart Schaefer

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).