diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-04 17:56:46 +0100 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-01-04 17:56:46 +0100 |
| commit | 56404e1fffd04da9f3aef8be1bdf52642ca5ad67 (patch) | |
| tree | 4bd42d76e0dfeb4f40a4f1a1db73618a42716fc1 /zsh | |
| parent | 731d554f942bcce1b4f1b152186728a670a8f920 (diff) | |
Update plan, deps and git status
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/functions/status.zsh | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/zsh/functions/status.zsh b/zsh/functions/status.zsh index 0153435..82544f0 100644 --- a/zsh/functions/status.zsh +++ b/zsh/functions/status.zsh @@ -38,21 +38,37 @@ function git_info { status_output=$(git status --short) - if echo "$status_output" | rg -q '^??'; then - echo -n "%{%F{magenta}%}?%f" + # Modified Files, Unstaged + if echo "$status_output" | rg -q '^ M'; then + echo -n "%{%F{magenta}%}△%f" fi - if echo "$status_output" | rg -q '^ M'; then - echo -n "%{%F{magenta}%}!%f" + # Modified Files, Staged + if echo "$status_output" | rg -q '^M'; then + echo -n "%{%F{green}%}△%f" fi - if echo "$status_output" | rg -q '^ D'; then - echo -n "%{%F{magenta}%}×%f" + # Untracked Files + if echo "$status_output" | rg -q '^\?\?'; then + echo -n "%{%F{magenta}%}+%f" fi + # Added Files if echo "$status_output" | rg -q '^A '; then echo -n "%{%F{green}%}+%f" fi + + # Deleted Files, Unstaged + if echo "$status_output" | rg -q '^ D'; then + echo -n "%{%F{magenta}%}×%f" + fi + + # Deleted Files, Staged + if echo "$status_output" | rg -q '^D'; then + echo -n "%{%F{green}%}×%f" + fi + + echo -n "%f" fi } |