From 45758d95fb43730f75b3f75c6c7034de7e81b7cf Mon Sep 17 00:00:00 2001
From: "Clark S. Cox" <clark.cox@apple.com>
Date: Thu, 1 Dec 2022 16:08:09 -0800
Subject: Use "machine" where available for CPU arch

This allows shells on macOS to display more specific CPU arch (e.g. a 64-bit intel machine will display "x86_64" instead of "i386")
---
 internal/p10k.zsh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'internal/p10k.zsh')

diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 2e816714..a5e004b3 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5656,7 +5656,9 @@ prompt_cpu_arch() {
     state=$_p9k__cache_val[1]
     text=$_p9k__cache_val[2]
   else
-    text=$(command arch) 2>/dev/null && [[ $text == [a-zA-Z][a-zA-Z0-9_]# ]] || text=
+    text=$(command machine) 2>/dev/null && [[ $text == [a-zA-Z][a-zA-Z0-9_]# ]] ||
+      text=$(command arch) 2>/dev/null && [[ $text == [a-zA-Z][a-zA-Z0-9_]# ]] ||
+      text=
     state=_${(U)text}
     _p9k_cache_ephemeral_set "$state" "$text"
   fi
-- 
cgit v1.2.3