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:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user