1

I would like a zsh plugin to show me which git repositories have changes to be pushed based on the color of the root directory.

Ex://
Code
\Project1
\Project2

I would like Project1 and Project2 to be colored based on their git status when you run ls from the Code directory.

How can I make that happen?

seagoj
  • 259
  • 1
  • 2
  • 14

1 Answers1

2

You can try some zsh git theme like this one, which changes the directory color to reflect a dirty status:

https://raw.github.com/gist/3712874/5d28e2d9fe2e4d0a4fda0315ad97bdafa399425c/screenshot.png


Another alternative is to keep the status color separate from the directory itself: see this zsh theme (from Josh Dick)to shows a "traffic light" representation of git status:

  • Red (●) means there are untracked changes.
  • Yellow (●) means there are unstaged changes.
  • Green (●) means there are staged changes.

http://blog.joshdick.net/asset/post_assets/2012/12/git_zsh_prompt.png

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I actually already use something similar, but I was looking to have the indicator without actually being in the repo itself, so I could ls my ~/code directory and have all clean/dirty information for all repos. – seagoj Sep 06 '13 at 16:36
  • @seagoj I understand. I don't know of a "color-based" solution, only of scripts like http://blog.mikepearce.net/2010/06/16/git-status-on-multiple-repos/ or the ones mentioned in http://stackoverflow.com/q/2765253/6309. – VonC Sep 06 '13 at 16:52