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.
This commit is contained in:
2026-05-12 01:04:17 +02:00
parent d53bc5dadb
commit 029191654c
3 changed files with 11 additions and 2 deletions
+1 -1
View File
@@ -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"
+1 -1
View File
@@ -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"
+9
View File
@@ -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