Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH] Include US spelling of "grey"



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@xxxxxxxxxxxxxxxxxx>
---
 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@xxxxxxxxx>
+
+	* Include US spelling of "grey" ("gray")
+
 2021-12-07  Oliver Kiddle  <opk@xxxxxxx>
 
 	* 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





Messages sorted by: Reverse Date, Date, Thread, Author