From 029191654cc72c95757ebfcfcaaeb9548a90f647 Mon Sep 17 00:00:00 2001 From: "s0wlz (Matthias Puchstein)" Date: Tue, 12 May 2026 01:04:17 +0200 Subject: [PATCH] zsh: fix prompt git status parsing and add pnpm to PATH Use process substitution instead of herestring for git status loop to avoid issues with special characters. Add pnpm home to PATH in zshrc. --- dot_config/zsh/apex-aeon.zsh | 2 +- dot_config/zsh/apex-neon.zsh | 2 +- dot_config/zsh/dot_zshrc.tmpl | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dot_config/zsh/apex-aeon.zsh b/dot_config/zsh/apex-aeon.zsh index 479c6a0..61baf46 100644 --- a/dot_config/zsh/apex-aeon.zsh +++ b/dot_config/zsh/apex-aeon.zsh @@ -292,7 +292,7 @@ apex_git_update() { apex_git_untracked=1 ;; esac - done <<<"$status_out" + done < <(print -r -- "$status_out") if [[ -n "$branch_head" && "$branch_head" != "(detached)" && "$branch_head" != "HEAD" ]]; then apex_git_branch="$branch_head" diff --git a/dot_config/zsh/apex-neon.zsh b/dot_config/zsh/apex-neon.zsh index a6ea3ac..530157c 100644 --- a/dot_config/zsh/apex-neon.zsh +++ b/dot_config/zsh/apex-neon.zsh @@ -292,7 +292,7 @@ apex_git_update() { apex_git_untracked=1 ;; esac - done <<<"$status_out" + done < <(print -r -- "$status_out") if [[ -n "$branch_head" && "$branch_head" != "(detached)" && "$branch_head" != "HEAD" ]]; then apex_git_branch="$branch_head" diff --git a/dot_config/zsh/dot_zshrc.tmpl b/dot_config/zsh/dot_zshrc.tmpl index b3fa2e5..9f3d87f 100644 --- a/dot_config/zsh/dot_zshrc.tmpl +++ b/dot_config/zsh/dot_zshrc.tmpl @@ -29,3 +29,12 @@ bindkey -M vicmd 'j' history-substring-search-down # Initialize Apex Neon Theme source ~/.config/zsh/{{ .chezmoi.config.data.theme }}.zsh + +# pnpm +export PNPM_HOME="/home/mpuchstein/.local/share/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +# pnpm end +