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

PATCH: prompt adam2 does not check for all spellings of language files





On Sun, Jun 8, 2025 at 5:15 AM Jim <linux.tech.guy@xxxxxxxxx> wrote:
In my case, parameter LANG is
set to "en_US.utf8" and adam2 only checks for uppercase and with a hyphen:

  if [[ ${LC_ALL:-${LC_CTYPE:-$LANG}} = *UTF-8* ]]; then

 
Following the example in "prompt_special_chars" I'm submitting the attached
patch that checks for the additional spelling.

Regards,

Jim Murphy
diff --git a/Functions/Prompts/prompt_adam2_setup b/Functions/Prompts/prompt_adam2_setup
index b9445116b..29bf4dc08 100644
--- a/Functions/Prompts/prompt_adam2_setup
+++ b/Functions/Prompts/prompt_adam2_setup
@@ -25,7 +25,7 @@ prompt_adam2_setup () {
 
   if [[ $1 == '8bit' ]]; then
     shift
-    if [[ ${LC_ALL:-${LC_CTYPE:-$LANG}} = *UTF-8* ]]; then
+    if [[ ${LC_ALL:-${LC_CTYPE:-$LANG}} = *(UTF-8|utf8)* ]]; then
       prompt_gfx_tlc=$'\xe2\x94\x8c'
       prompt_gfx_mlc=$'\xe2\x94\x9c'
       prompt_gfx_blc=$'\xe2\x94\x94'


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