From: Samir Benmendil Date: Tue, 7 Dec 2021 13:47:33 +0000 (+0000) Subject: zsh/prompt: handle intend-to-add status properly X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/4605cb5190771d1a93e164e525f202efb62e3875 zsh/prompt: handle intend-to-add status properly It used to make the markers for the files dissappear entirely, with this change the files that are added with `--intend-to-add` are marked as both added(+) and modified(*). --- diff --git a/zsh/lib/prompt.zsh b/zsh/lib/prompt.zsh index a1be82b..56d702b 100644 --- a/zsh/lib/prompt.zsh +++ b/zsh/lib/prompt.zsh @@ -62,6 +62,7 @@ git_prompt_status() { [[ "$line" == 2\ R[.MTD]\ * ]] && (( renamed++ )) # work tree + [[ "$line" == 1\ [.MARCT]A\ * ]] && (( added++ , modified++ )) # intend-to-add [[ "$line" == 1\ [.MARCT]M\ * ]] && (( modified++ )) [[ "$line" == 1\ [.MARCT]D\ * ]] && (( deleted_wt++ )) [[ "$line" == \?\ * ]] && (( untracked++ ))