my nixos flake :3 (git.koi.rip mirror) git.koi.rip/koi/flake
nixos catppuccin linux dotfiles neovim
0

Configure Feed

Select the types of activity you want to include in your feed.

zsh: clean up prompt logic

Signed-off-by: june <me@koi.rip>
Reviewed-by: june <me@koi.rip>
Reviewed-on: https://git.koi.rip/koi/dotfiles/pulls/1

authored by

robin and committed by
june
(May 18, 2026, 12:16 AM +0200) fc57a10d 18228dbb

+17 -9
+17 -9
external/zsh/prompt.zsh
··· 61 61 fi 62 62 63 63 if [[ -z "$vcs_info_msg_0_" ]]; then 64 - if [[ -n "$nix_shell" ]]; then 65 - PROMPT="${nix_shell}${newline}${baseprompt}" 64 + PROMPT="" 65 + else 66 + if [[ -n "$(git diff --cached --name-status 2>/dev/null)" ]]; then 67 + PROMPT="${vcs_info_msg_0_}${reset} ! " 68 + elif [[ -n "$(git diff --name-status 2>/dev/null)" ]]; then 69 + PROMPT="${vcs_info_msg_0_}${reset} !! " 66 70 else 67 - PROMPT="${baseprompt}" 71 + PROMPT="${vcs_info_msg_0_} " 68 72 fi 69 - elif [[ -n "$(git diff --cached --name-status 2>/dev/null)" ]]; then 70 - PROMPT="${vcs_info_msg_0_}${reset} COMMIT ${nix_shell} ${newline}${baseprompt}" 71 - elif [[ -n "$(git diff --name-status 2>/dev/null)" ]]; then 72 - PROMPT="${vcs_info_msg_0_}${reset} DIRTY ${nix_shell} ${newline}${baseprompt}" 73 - else 74 - PROMPT="${vcs_info_msg_0_} ${nix_shell}${newline}${baseprompt}" 73 + fi 74 + 75 + if [[ -n "$nix_shell" ]]; then 76 + PROMPT+="${nix_shell}" 77 + fi 78 + 79 + if [[ -n "$PROMPT" ]]; then 80 + PROMPT+="${newline}" 75 81 fi 82 + 83 + PROMPT+="${baseprompt}" 76 84 77 85 printf '\e[5 q' 78 86 }