aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/p10k.zsh2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 478ce3bd..643a8ea7 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -2062,6 +2062,8 @@ prompt_package() {
() {
local data field
local -A found
+ # Redneck json parsing. Yields correct results for any well-formed json document.
+ # Produces random garbage for invalid json.
{ data="$(<$file)" || return } 2>/dev/null
data=${data##[[:space:]]#}
[[ $data == '{'* ]] || return