]> git.r.bdr.sh - rbdr/dotfiles/blobdiff - zsh/functions/status.zsh
Update plan, deps and git status
[rbdr/dotfiles] / zsh / functions / status.zsh
index 01534353815e6fe42970ec6f35ca9a1f3ba8a44f..82544f0e03c45d3dd37608964ac77b15b74235e2 100644 (file)
@@ -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
 }